Class Client.AliasClusteredClient

java.lang.Object
org.apache.tinkerpop.gremlin.driver.Client
org.apache.tinkerpop.gremlin.driver.Client.AliasClusteredClient
All Implemented Interfaces:
RequestSubmitter, RequestSubmitterAsync
Enclosing class:
Client

public static class Client.AliasClusteredClient extends Client
Uses a Client.ClusteredClient that rebinds requests to a specified Graph or TraversalSource instances on the server-side.
  • Method Details

    • submitAsync

      public CompletableFuture<ResultSet> submitAsync(org.apache.tinkerpop.gremlin.util.message.RequestMessage msg)
      Description copied from class: Client
      A low-level method that allows the submission of a manually constructed RequestMessage.
      Overrides:
      submitAsync in class Client
    • init

      public Client init()
      Description copied from class: Client
      Initializes the client which typically means that a connection is established to the server. Depending on the implementation and configuration this blocking call may take some time. This method will be called automatically if it is not called directly and multiple calls will not have effect.
      Overrides:
      init in class Client
    • 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
    • initializeImplementation

      protected void initializeImplementation()
      Description copied from class: Client
      Called in the Client.init() method.
      Specified by:
      initializeImplementation 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
      Delegates to the underlying Client.ClusteredClient.
      Specified by:
      chooseConnection in class Client
      Throws:
      TimeoutException
      org.apache.tinkerpop.gremlin.driver.exception.ConnectionException
    • close

      public void close()
      Description copied from class: Client
      Closes the client by making a synchronous call to Client.closeAsync().
      Overrides:
      close in class Client
    • closeAsync

      public CompletableFuture<Void> closeAsync()
      Description copied from class: Client
      Asynchronous close of the Client.
      Specified by:
      closeAsync in class Client
    • isClosing

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

      public Client alias(String graphOrTraversalSource)
      Create a new Client that aliases the specified Graph or TraversalSource name on the server to a variable called "g" for the context of the requests made through that Client.
      Overrides:
      alias in class Client
      Parameters:
      graphOrTraversalSource - rebinds the specified global Gremlin Server variable to "g"