Class Client.SessionedChildClient
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.driver.Client
-
- org.apache.tinkerpop.gremlin.driver.Client.SessionedChildClient
-
- Enclosing class:
- Client
public static final class Client.SessionedChildClient extends Client
AClientimplementation that operates in the context of a session.ChildSessionClientis tied to another client as a child, it borrows the connection from the parent client's pool for the transaction. Requests are sent to a single server, where each request is bound to the same thread and same connection with the same set of bindings across requests. Transaction are not automatically committed. It is up the client to issue commit/rollback commands.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.driver.Client
Client.AliasClusteredClient, Client.ClusteredClient, Client.SessionedChildClient, Client.SessionedClient, Client.SessionSettings, Client.Settings
-
-
Field Summary
-
Fields inherited from class org.apache.tinkerpop.gremlin.driver.Client
cluster, initialized, settings, TOO_MANY_IN_FLIGHT_REQUESTS
-
-
Constructor Summary
Constructors Constructor Description SessionedChildClient(Client parentClient, String sessionId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestMessage.BuilderbuildMessage(RequestMessage.Builder builder)Makes any initial changes to the builder and returns the constructedRequestMessage.protected org.apache.tinkerpop.gremlin.driver.ConnectionchooseConnection(RequestMessage msg)Chooses aConnectionto write the message to.CompletableFuture<Void>closeAsync()Asynchronous close of theClient.StringgetSessionId()protected voidinitializeImplementation()Called in theClient.init()method.booleanisClosing()-
Methods inherited from class org.apache.tinkerpop.gremlin.driver.Client
alias, alias, close, getCluster, getSettings, init, makeDefaultAliasMap, submit, submit, submit, submit, submit, submit, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync
-
-
-
-
Method Detail
-
getSessionId
public String getSessionId()
-
buildMessage
public RequestMessage.Builder buildMessage(RequestMessage.Builder builder)
Description copied from class:ClientMakes any initial changes to the builder and returns the constructedRequestMessage. Implementers may choose to override this message to append data to the request before sending. By default, this method will simply return thebuilderpassed in by the caller.- Overrides:
buildMessagein classClient
-
initializeImplementation
protected void initializeImplementation()
Description copied from class:ClientCalled in theClient.init()method.- Specified by:
initializeImplementationin classClient
-
chooseConnection
protected org.apache.tinkerpop.gremlin.driver.Connection chooseConnection(RequestMessage msg) throws TimeoutException, ConnectionException
Description copied from class:ClientChooses aConnectionto write the message to.- Specified by:
chooseConnectionin classClient- Throws:
TimeoutExceptionConnectionException
-
closeAsync
public CompletableFuture<Void> closeAsync()
Description copied from class:ClientAsynchronous close of theClient.- Specified by:
closeAsyncin classClient
-
-