public static final class Client.SessionedClient extends Client
Client
implementation that operates in the context of a session. Requests are sent to a single
server, where each request is bound to the same thread with the same set of bindings across requests.
Transaction are not automatically committed. It is up the client to issue commit/rollback commands.Client.AliasClusteredClient, Client.ClusteredClient, Client.ReboundClusteredClient, Client.SessionedClient
cluster, initialized
Modifier and Type | Method and Description |
---|---|
Client |
alias(String graphOrTraversalSource)
The sessioned client does not support this feature.
|
org.apache.tinkerpop.gremlin.driver.message.RequestMessage |
buildMessage(org.apache.tinkerpop.gremlin.driver.message.RequestMessage.Builder builder)
Adds the
Tokens.ARGS_SESSION value to every RequestMessage . |
protected org.apache.tinkerpop.gremlin.driver.Connection |
chooseConnection(org.apache.tinkerpop.gremlin.driver.message.RequestMessage msg)
Since the session is bound to a single host, simply borrow a connection from that pool.
|
CompletableFuture<Void> |
closeAsync()
Close the bound
ConnectionPool . |
protected void |
initializeImplementation()
Randomly choose an available
Host to bind the session too and initialize the ConnectionPool . |
Client |
rebind(String graphOrTraversalSourceName)
Deprecated.
As of release 3.1.0, replaced by
alias(String) |
close, init, submit, submit, submitAsync, submitAsync, submitAsync
@Deprecated public Client rebind(String graphOrTraversalSourceName)
alias(String)
rebind
in class Client
graphOrTraversalSourceName
- rebinds the specified global Gremlin Server variable to "g"UnsupportedOperationException
public Client alias(String graphOrTraversalSource)
alias
in class Client
graphOrTraversalSource
- rebinds the specified global Gremlin Server variable to "g"UnsupportedOperationException
public org.apache.tinkerpop.gremlin.driver.message.RequestMessage buildMessage(org.apache.tinkerpop.gremlin.driver.message.RequestMessage.Builder builder)
Tokens.ARGS_SESSION
value to every RequestMessage
.buildMessage
in class Client
protected org.apache.tinkerpop.gremlin.driver.Connection chooseConnection(org.apache.tinkerpop.gremlin.driver.message.RequestMessage msg) throws TimeoutException, org.apache.tinkerpop.gremlin.driver.exception.ConnectionException
chooseConnection
in class Client
TimeoutException
org.apache.tinkerpop.gremlin.driver.exception.ConnectionException
protected void initializeImplementation()
Host
to bind the session too and initialize the ConnectionPool
.initializeImplementation
in class Client
public CompletableFuture<Void> closeAsync()
ConnectionPool
.closeAsync
in class Client
Copyright © 2013–2016 Apache Software Foundation. All rights reserved.