public class RemoteGraph extends Object implements Graph
ServerGraph
represents a proxy by which traversals spawned from this graph are expected over a
RemoteConnection
. This is not a full Graph
implementation in the sense that the most of the methods
will throw an UnsupportedOperationException
. This implementation can only be used for spawning remote
traversal instances.Modifier and Type | Class and Description |
---|---|
static class |
RemoteGraph.RemoteFeatures |
static class |
RemoteGraph.RemoteGraphFeatures |
Graph.Exceptions, Graph.Features, Graph.Hidden, Graph.OptIn, Graph.OptIns, Graph.OptOut, Graph.OptOuts, Graph.Variables
Modifier and Type | Field and Description |
---|---|
static String |
GREMLIN_REMOTE_GRAPH_REMOTE_CONNECTION_CLASS |
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()
Closes the underlying
RemoteConnection . |
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)
This method returns an empty
Iterator - it is not meant to be called directly. |
Graph.Features |
features()
Gets the
Graph.Features exposed by the underlying Graph implementation. |
RemoteConnection |
getConnection() |
static RemoteGraph |
open(Configuration conf)
Creates a new
RemoteGraph instance using the specified configuration, which allows RemoteGraph
to be compliant with GraphFactory . |
String |
toString() |
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. |
Iterator<Vertex> |
vertices(Object... vertexIds)
This method returns an empty
Iterator - it is not meant to be called directly. |
public static final String GREMLIN_REMOTE_GRAPH_REMOTE_CONNECTION_CLASS
public static RemoteGraph open(Configuration conf)
RemoteGraph
instance using the specified configuration, which allows RemoteGraph
to be compliant with GraphFactory
. Expects key for GREMLIN_REMOTE_GRAPH_REMOTE_CONNECTION_CLASS
as well as any configuration required by the underlying RemoteConnection
which will be instantiated.
Note that the Configuration
object is passed down without change to the creation of the
RemoteConnection
instance.public RemoteConnection getConnection()
public void close() throws Exception
RemoteConnection
.close
in interface AutoCloseable
close
in interface Graph
Exception
public <C extends GraphComputer> C compute(Class<C> graphComputerClass) throws IllegalArgumentException
Graph
GraphComputer
to use for OLAP operations on the graph.
If the graph does not support graph computer then an UnsupportedOperationException
is thrown.compute
in interface Graph
graphComputerClass
- The graph computer class to use.IllegalArgumentException
- if the provided GraphComputer
class is not supported.public GraphComputer compute() throws IllegalArgumentException
Graph
GraphComputer
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 Graph
IllegalArgumentException
- if there is no default graph computerpublic Iterator<Vertex> vertices(Object... vertexIds)
Iterator
- it is not meant to be called directly.public Iterator<Edge> edges(Object... edgeIds)
Iterator
- it is not meant to be called directly.public Transaction tx()
Graph
Transaction
in the TinkerPop context is a
transaction "factory" or "controller" that helps manage transactions owned by the underlying graph database.public Graph.Variables variables()
Graph
Graph.Variables
associated with the graph.
Variables are used for storing metadata about the graph.public Configuration configuration()
Graph
org.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 Graph
public Graph.Features features()
Graph
Graph.Features
exposed by the underlying Graph
implementation.Copyright © 2013–2016 Apache Software Foundation. All rights reserved.