public class EmbeddedRemoteConnection extends Object implements RemoteConnection
RemoteConnectionto be submitted to a "local"
Graphinstance thus simulating a connection to a remote source. Basic usage is as follows:
// Using TinkerGraph here but any embedded Graph instance would suffice Graph graph = TinkerFactory.createModern(); GraphTraversalSource g = graph.traversal(); // setup the remote as normal but give it the embedded "g" so that it executes against that GraphTraversalSource simulatedRemoteG = TraversalSourceFactory.traversal(new EmbeddedRemoteConnection(g)); assertEquals(6, simulatedRemoteG.V().count().next().intValue());
|Constructor and Description|
|Modifier and Type||Method and Description|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public EmbeddedRemoteConnection(GraphTraversalSource g)
public <E> CompletableFuture<RemoteTraversal<?,E>> submitAsync(Bytecode bytecode) throws RemoteConnectionException
Bytecodeto a server and returns a promise of a
RemoteTraversalis an abstraction over two types of results that can be returned as part of the response from the server: the results of the
Traversalitself and the side-effects that it produced.
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.