public class RemoteGraph extends Object implements Graph
RemoteGraph is only required for integrating with the test suite as there must be a Graph instance
for the test suite to bind to. Test suites that use this must ensure that the TraversalSource be
generated from their GraphProvider in via AnonymousTraversalSource.withRemote(RemoteConnection) or
similar overload. See RemoteGraphProvider in the gremlin-server module for an example.| 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 | Method and Description |
|---|---|
Vertex |
addVertex(Object... keyValues) |
void |
close()
Closes the underlying
RemoteConnection. |
GraphComputer |
compute() |
<C extends GraphComputer> |
compute(Class<C> graphComputerClass) |
org.apache.commons.configuration.Configuration |
configuration() |
Iterator<Edge> |
edges(Object... edgeIds)
This method returns an empty
Iterator - it is not meant to be called directly. |
Graph.Features |
features() |
RemoteConnection |
getConnection() |
static RemoteGraph |
open(org.apache.commons.configuration.Configuration conf)
Creates a new
RemoteGraph instance using the specified configuration, which allows RemoteGraph
to be compliant with GraphFactory. |
static RemoteGraph |
open(RemoteConnection connection,
org.apache.commons.configuration.Configuration conf)
Creates a new
RemoteGraph instance. |
static RemoteGraph |
open(String configFile) |
String |
toString() |
Transaction |
tx() |
Graph.Variables |
variables() |
Iterator<Vertex> |
vertices(Object... vertexIds)
This method returns an empty
Iterator - it is not meant to be called directly. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddVertex, io, traversal, traversalgetHostingVertexpublic static RemoteGraph open(org.apache.commons.configuration.Configuration conf)
RemoteGraph instance using the specified configuration, which allows RemoteGraph
to be compliant with GraphFactory. Expects key for RemoteConnection.GREMLIN_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 static RemoteGraph open(String configFile) throws Exception
Exceptionpublic static RemoteGraph open(RemoteConnection connection, org.apache.commons.configuration.Configuration conf)
RemoteGraph instance. RemoteGraph will attempt to call the
AutoCloseable.close() method when the close() method is called on this class.connection - the RemoteConnection instance to use
RemoteConnectionpublic 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
compute in interface GraphIllegalArgumentExceptionpublic GraphComputer compute() throws IllegalArgumentException
compute in interface GraphIllegalArgumentExceptionpublic 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()
public Graph.Variables variables()
public org.apache.commons.configuration.Configuration configuration()
configuration in interface Graphpublic Graph.Features features()
Copyright © 2013–2021 Apache Software Foundation. All rights reserved.