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 AutoCloseableclose in interface GraphExceptionpublic <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)
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()
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 Graph.Features features()
GraphGraph.Features exposed by the underlying Graph implementation.Copyright © 2013–2016 Apache Software Foundation. All rights reserved.