Interface RemoteConnection
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DriverRemoteConnection,EmbeddedRemoteConnection
A simple abstraction of a "connection" to a "server" that is capable of processing a
Traversal and
returning results. Results refer to both the Iterator of results from the submitted Traversal
as well as the side-effects produced by that Traversal. Those results together are wrapped in a
Traversal.- Author:
- Stephen Mallette (http://stephen.genoprime.com), Marko A. Rodriguez (http://markorodriguez.com)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic RemoteConnectionfrom(org.apache.commons.configuration2.Configuration conf) Create aRemoteConnectionfrom aConfigurationobject.default PDTRegistryReturns thePDTRegistryassociated with this connection, ornullif none.<E> CompletableFuture<RemoteTraversal<?,E>> submitAsync(GremlinLang gremlinLang) default Transactiontx()Creates aTransactionobject designed to work with remote semantics.Methods inherited from interface java.lang.AutoCloseable
close
-
Field Details
-
GREMLIN_REMOTE
- See Also:
-
GREMLIN_REMOTE_CONNECTION_CLASS
- See Also:
-
-
Method Details
-
tx
Creates aTransactionobject designed to work with remote semantics. -
submitAsync
<E> CompletableFuture<RemoteTraversal<?,E>> submitAsync(GremlinLang gremlinLang) throws RemoteConnectionException SubmitsTraversalGremlinLangto 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
-
getPdtRegistry
Returns thePDTRegistryassociated with this connection, ornullif none. Used by the gremlin-lang translator for registry-based dehydration of unknown types. -
from
Create aRemoteConnectionfrom aConfigurationobject. The configuration must contain agremlin.remote.remoteConnectionClasskey which is the fully qualified class name of aRemoteConnectionclass.
-