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 aTraversal
and returning results. Results refer to both theIterator
of results from the submittedTraversal
as 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 String
GREMLIN_REMOTE
static String
GREMLIN_REMOTE_CONNECTION_CLASS
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static RemoteConnection
from(org.apache.commons.configuration2.Configuration conf)
Create aRemoteConnection
from aConfiguration
object.<E> CompletableFuture<RemoteTraversal<?,E>>
submitAsync(Bytecode bytecode)
default Transaction
tx()
Creates aTransaction
object 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 aTransaction
object designed to work with remote semantics.
-
submitAsync
<E> CompletableFuture<RemoteTraversal<?,E>> submitAsync(Bytecode bytecode) throws RemoteConnectionException
SubmitsTraversal
Bytecode
to a server and returns a promise of aRemoteTraversal
. TheRemoteTraversal
is an abstraction over two types of results that can be returned as part of the response from the server: the results of theTraversal
itself and the side-effects that it produced.- Throws:
RemoteConnectionException
-
from
static RemoteConnection from(org.apache.commons.configuration2.Configuration conf)
Create aRemoteConnection
from aConfiguration
object. The configuration must contain agremlin.remote.remoteConnectionClass
key which is the fully qualified class name of aRemoteConnection
class.
-
-