org.apache.tinkerpop.gremlin.driver

## Class Client.AliasClusteredClient

- java.lang.Object
- - org.apache.tinkerpop.gremlin.driver.Client
  - - org.apache.tinkerpop.gremlin.driver.Client.AliasClusteredClient

- 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.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.driver.Client

      `Client.AliasClusteredClient, Client.ClusteredClient, Client.SessionedClient, Client.SessionSettings, Client.Settings`

  - ### Field Summary

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.driver.Client

      `cluster, initializationFailure, initialized, settings`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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`.
    `void` | `close()` Closes the client by making a synchronous call to `Client.closeAsync()`.
    `CompletableFuture<Void>` | `closeAsync()` Asynchronous close of the `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)`.

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.driver.Client

      `alias, getCluster, getSettings, makeDefaultAliasMap, submit, submit, submit, submit, submit, submit, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### submitAsync

          public CompletableFuture<ResultSet> submitAsync(Bytecode bytecode)

      Description copied from class: `Client`
      An asynchronous version of `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.
      Overrides:
        `submitAsync` in class `Client`

    - #### submitAsync

          public CompletableFuture<ResultSet> submitAsync(Bytecode bytecode,
                                                          RequestOptions options)

      Description copied from class: `Client`
      A version of `Client.submit(Bytecode)` which provides the ability to set per-request options.
      Overrides:
        `submitAsync` in class `Client`
      Parameters:
        `bytecode` - request in the form of gremlin `Bytecode`
        `options` - for the request
      See Also:
        `Client.submitAsync(Bytecode)`

    - #### submitAsync

          public CompletableFuture<ResultSet> submitAsync(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`

    - #### submitAsync

          public CompletableFuture<ResultSet> submitAsync(Traversal traversal)

      Description copied from class: `Client`
      An asynchronous version of `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.
      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 RequestMessage.Builder buildMessage(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(RequestMessage msg)
                                                                             throws TimeoutException,
                                                                                    ConnectionException

      Delegates to the underlying `Client.ClusteredClient`.
      Specified by:
        `chooseConnection` in class `Client`
      Throws:
        `TimeoutException`
        `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(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`.
      Overrides:
        `alias` in class `Client`

Copyright © 2013–2022 Apache Software Foundation. All rights reserved.