public static class Client.AliasClusteredClient extends Client
Client.ClusteredClient
that rebinds requests to a
specified Graph
or TraversalSource
instances on the server-side.Client.AliasClusteredClient, Client.ClusteredClient, Client.SessionedClient, Client.SessionSettings, Client.Settings
cluster, initialized, settings
Modifier and Type | Method and Description |
---|---|
Client |
alias(Map<String,String> aliases)
Creates a
Client that supplies the specified set of aliases, thus allowing the user to re-name
one or more globally defined Graph or TraversalSource server bindings for the context of
the created Client . |
RequestMessage.Builder |
buildMessage(RequestMessage.Builder builder)
Makes any initial changes to the builder and returns the constructed
RequestMessage . |
protected org.apache.tinkerpop.gremlin.driver.Connection |
chooseConnection(RequestMessage msg)
Delegates to the underlying
Client.ClusteredClient . |
CompletableFuture<Void> |
closeAsync()
Prevents messages from being sent from this
Client . |
Client |
init()
Initializes the client which typically means that a connection is established to the server.
|
protected void |
initializeImplementation()
Called in the
Client.init() method. |
boolean |
isClosing() |
CompletableFuture<ResultSet> |
submitAsync(Bytecode bytecode)
An asynchronous version of
Client.submit(Traversal) . |
CompletableFuture<ResultSet> |
submitAsync(Bytecode bytecode,
RequestOptions options)
A version of
Client.submit(Bytecode) which provides the ability to set per-request options. |
CompletableFuture<ResultSet> |
submitAsync(RequestMessage msg)
A low-level method that allows the submission of a manually constructed
RequestMessage . |
CompletableFuture<ResultSet> |
submitAsync(Traversal traversal)
An asynchronous version of
Client.submit(Traversal) . |
alias, close, getCluster, getSettings, makeDefaultAliasMap, submit, submit, submit, submit, submit, submit, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync
public CompletableFuture<ResultSet> submitAsync(Bytecode bytecode)
Client
Client.submit(Traversal)
. Results are returned as Traverser
instances and
are therefore bulked, meaning that to properly iterate the contents of the result each Traverser.bulk()
must be examined to determine the number of times that object should be presented in iteration.submitAsync
in class Client
public CompletableFuture<ResultSet> submitAsync(Bytecode bytecode, RequestOptions options)
Client
Client.submit(Bytecode)
which provides the ability to set per-request options.submitAsync
in class Client
bytecode
- request in the form of gremlin Bytecode
options
- for the requestClient.submitAsync(Bytecode)
public CompletableFuture<ResultSet> submitAsync(RequestMessage msg)
Client
RequestMessage
.submitAsync
in class Client
public CompletableFuture<ResultSet> submitAsync(Traversal traversal)
Client
Client.submit(Traversal)
. Results are returned as Traverser
instances and
are therefore bulked, meaning that to properly iterate the contents of the result each Traverser.bulk()
must be examined to determine the number of times that object should be presented in iteration.submitAsync
in class Client
public Client init()
Client
public RequestMessage.Builder buildMessage(RequestMessage.Builder builder)
Client
RequestMessage
. Implementers
may choose to override this message to append data to the request before sending. By default, this method
will simply return the builder
passed in by the caller.buildMessage
in class Client
protected void initializeImplementation()
Client
Client.init()
method.initializeImplementation
in class Client
protected org.apache.tinkerpop.gremlin.driver.Connection chooseConnection(RequestMessage msg) throws TimeoutException, ConnectionException
Client.ClusteredClient
.chooseConnection
in class Client
TimeoutException
ConnectionException
public CompletableFuture<Void> closeAsync()
Client
. Note that calling this method does not call
close on the Client
that created it.closeAsync
in class Client
Copyright © 2013–2019 Apache Software Foundation. All rights reserved.