Class Client.SessionedChildClient

  • Enclosing class:
    Client

    public static final class Client.SessionedChildClient
    extends Client
    A Client implementation that operates in the context of a session. ChildSessionClient is 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.
    • Constructor Detail

      • SessionedChildClient

        public SessionedChildClient​(Client parentClient,
                                    String sessionId)
    • Method Detail

      • getSessionId

        public String getSessionId()
      • buildMessage

        public org.apache.tinkerpop.gremlin.util.message.RequestMessage.Builder buildMessage​(org.apache.tinkerpop.gremlin.util.message.RequestMessage.Builder builder)
        Description copied from class: Client
        Makes any initial changes to the builder and returns the constructed 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.
        Overrides:
        buildMessage in class Client
      • chooseConnection

        protected org.apache.tinkerpop.gremlin.driver.Connection chooseConnection​(org.apache.tinkerpop.gremlin.util.message.RequestMessage msg)
                                                                           throws TimeoutException,
                                                                                  org.apache.tinkerpop.gremlin.driver.exception.ConnectionException
        Description copied from class: Client
        Chooses a Connection to write the message to.
        Specified by:
        chooseConnection in class Client
        Throws:
        TimeoutException
        org.apache.tinkerpop.gremlin.driver.exception.ConnectionException
      • isClosing

        public boolean isClosing()
        Specified by:
        isClosing in class Client