Interface RemoteConnection
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DriverRemoteConnection,DriverRemoteTransaction,EmbeddedRemoteConnection
public interface RemoteConnection extends AutoCloseable
A simple abstraction of a "connection" to a "server" that is capable of processing aTraversaland returning results. Results refer to both theIteratorof results from the submittedTraversalas well as the side-effects produced by thatTraversal. Those results together are wrapped in aTraversal.- Author:
- Stephen Mallette (http://stephen.genoprime.com), Marko A. Rodriguez (http://markorodriguez.com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringGREMLIN_REMOTEstatic StringGREMLIN_REMOTE_CONNECTION_CLASS
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static RemoteConnectionfrom(org.apache.commons.configuration2.Configuration conf)Create aRemoteConnectionfrom aConfigurationobject.<E> CompletableFuture<RemoteTraversal<?,E>>submitAsync(Bytecode bytecode)default Transactiontx()Creates aTransactionobject designed to work with remote semantics.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Field Detail
-
GREMLIN_REMOTE
static final String GREMLIN_REMOTE
- See Also:
- Constant Field Values
-
GREMLIN_REMOTE_CONNECTION_CLASS
static final String GREMLIN_REMOTE_CONNECTION_CLASS
- See Also:
- Constant Field Values
-
-
Method Detail
-
tx
default Transaction tx()
Creates aTransactionobject designed to work with remote semantics.
-
submitAsync
<E> CompletableFuture<RemoteTraversal<?,E>> submitAsync(Bytecode bytecode) throws RemoteConnectionException
SubmitsTraversalBytecodeto a server and returns a promise of aRemoteTraversal. TheRemoteTraversalis an abstraction over two types of results that can be returned as part of the response from the server: the results of theTraversalitself and the side-effects that it produced.- Throws:
RemoteConnectionException
-
from
static RemoteConnection from(org.apache.commons.configuration2.Configuration conf)
Create aRemoteConnectionfrom aConfigurationobject. The configuration must contain agremlin.remote.remoteConnectionClasskey which is the fully qualified class name of aRemoteConnectionclass.
-
-