public final class ComputerGraph extends Object implements Graph
| Modifier and Type | Class and Description |
|---|---|
class |
ComputerGraph.ComputerAdjacentVertex |
class |
ComputerGraph.ComputerEdge |
class |
ComputerGraph.ComputerElement |
class |
ComputerGraph.ComputerProperty<V> |
class |
ComputerGraph.ComputerVertex |
class |
ComputerGraph.ComputerVertexProperty<V> |
Graph.Exceptions, Graph.Features, Graph.Hidden, Graph.OptIn, Graph.OptIns, Graph.OptOut, Graph.OptOuts, Graph.Variables| Modifier and Type | Method and Description |
|---|---|
Vertex |
addVertex(Object... keyValues)
Add a
Vertex to the graph given an optional series of key/value pairs. |
void |
close()
Closing a
Graph is equivalent to "shutdown" and implies that no further operations can be executed on
the instance. |
GraphComputer |
compute()
Generate a
GraphComputer using the default engine of the underlying graph system. |
<C extends GraphComputer> |
compute(Class<C> graphComputerClass)
Declare the
GraphComputer to use for OLAP operations on the graph. |
Configuration |
configuration()
Get the
org.apache.commons.configuration.Configuration associated with the construction of this graph. |
Iterator<Edge> |
edges(Object... edgeIds)
|
ComputerGraph.ComputerVertex |
getStarVertex() |
static ComputerGraph.ComputerVertex |
mapReduce(Vertex starVertex) |
Transaction |
tx()
Configure and control the transactions for those graphs that support this feature.
|
Graph.Variables |
variables()
A collection of global
Graph.Variables associated with the graph. |
static ComputerGraph.ComputerVertex |
vertexProgram(Vertex starVertex,
VertexProgram vertexProgram) |
Iterator<Vertex> |
vertices(Object... vertexIds)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddVertex, features, io, traversal, traversalgetHostingVertexpublic static ComputerGraph.ComputerVertex vertexProgram(Vertex starVertex, VertexProgram vertexProgram)
public static ComputerGraph.ComputerVertex mapReduce(Vertex starVertex)
public ComputerGraph.ComputerVertex getStarVertex()
public <C extends GraphComputer> C compute(Class<C> graphComputerClass) throws IllegalArgumentException
GraphGraphComputer to use for OLAP operations on the graph.
If the graph does not support graph computer then an UnsupportedOperationException is thrown.compute in interface GraphgraphComputerClass - The graph computer class to use.IllegalArgumentException - if the provided GraphComputer class is not supported.public GraphComputer compute() throws IllegalArgumentException
GraphGraphComputer using the default engine of the underlying graph system.
This is a shorthand method for the more involved method that uses Graph.compute(Class).compute in interface GraphIllegalArgumentException - if there is no default graph computerpublic Iterator<Vertex> vertices(Object... vertexIds)
GraphVertex objects in this graph with the provided vertex ids or Vertex objects themselves.
If no ids are provided, get all vertices. Note that a vertex identifier does not need to correspond to the
actual id used in the graph. It needs to be a bit more flexible than that in that given the
Graph.Features around id support, multiple arguments might be applicable here.
If the graph return true for Graph.Features.ElementFeatures.supportsNumericIds() then it should support
filters as with:
true for Graph.Features.ElementFeatures.supportsCustomIds() ()} then it should support
filters as with:
true for Graph.Features.ElementFeatures.supportsAnyIds() ()} then it should support
filters as with:
true for Graph.Features.ElementFeatures.supportsStringIds() ()} then it should support
filters as with:
true for Graph.Features.ElementFeatures.supportsStringIds() ()} then it should support
filters as with:
public Iterator<Edge> edges(Object... edgeIds)
GraphEdge objects in this graph with the provided edge ids or Edge objects. If no ids are
provided, get all edges. Note that an edge identifier does not need to correspond to the actual id used in the
graph. It needs to be a bit more flexible than that in that given the Graph.Features around id support,
multiple arguments might be applicable here.
If the graph return true for Graph.Features.ElementFeatures.supportsNumericIds() then it should support
filters as with:
true for Graph.Features.ElementFeatures.supportsCustomIds() ()} then it should support
filters as with:
true for Graph.Features.ElementFeatures.supportsAnyIds() ()} then it should support
filters as with:
true for Graph.Features.ElementFeatures.supportsStringIds() ()} then it should support
filters as with:
public Transaction tx()
GraphTransaction in the TinkerPop context is a
transaction "factory" or "controller" that helps manage transactions owned by the underlying graph database.public Graph.Variables variables()
GraphGraph.Variables associated with the graph.
Variables are used for storing metadata about the graph.public Configuration configuration()
Graphorg.apache.commons.configuration.Configuration associated with the construction of this graph.
Whatever configuration was passed to GraphFactory#open(org.apache.commons.configuration.Configuration)
is what should be returned by this method.configuration in interface Graphpublic void close()
throws Exception
GraphGraph is equivalent to "shutdown" and implies that no further operations can be executed on
the instance. Users should consult the documentation of the underlying graph database implementation for what
this "shutdown" will mean in general and, if supported, how open transactions are handled. It will typically
be the end user's responsibility to synchronize the thread that calls close() with other threads that
are accessing open transactions. In other words, be sure that all work performed on the Graph instance
is complete prior to calling this method.
TinkerPop does not enforce any particular semantics with respect to "shutdown". It is up to the graph provider
to decide what this method will do.close in interface AutoCloseableclose in interface GraphExceptionCopyright © 2013–2019 Apache Software Foundation. All rights reserved.