public static final class Client.ClusteredClient extends Client
Client implementation that does not operate in a session.  Requests are sent to multiple servers
 given a LoadBalancingStrategy.  Transactions are automatically committed
 (or rolled-back on error) after each request.Client.AliasClusteredClient, Client.ClusteredClient, Client.SessionedClient, Client.SessionSettings, Client.Settings| Modifier and Type | Field and Description | 
|---|---|
| protected ConcurrentMap<Host,org.apache.tinkerpop.gremlin.driver.ConnectionPool> | hostConnectionPools | 
cluster, initialized, settings| Modifier and Type | Method and Description | 
|---|---|
| Client | alias(Map<String,String> aliases)Creates a  Clientthat supplies the specified set of aliases, thus allowing the user to re-name
 one or more globally definedGraphorTraversalSourceserver bindings for the context of
 the createdClient. | 
| Client | alias(String graphOrTraversalSource)Create a new  Clientthat aliases the specifiedGraphorTraversalSourcename on the
 server to a variable called "g" for the context of the requests made through thatClient. | 
| protected org.apache.tinkerpop.gremlin.driver.Connection | chooseConnection(org.apache.tinkerpop.gremlin.driver.message.RequestMessage msg)Uses a  LoadBalancingStrategyto choose the bestHostand then selects the best connection
 from that host's connection pool. | 
| CompletableFuture<Void> | closeAsync()Closes all the connection pools on all hosts. | 
| protected void | initializeImplementation()Initializes the connection pools on all hosts. | 
| boolean | isClosing() | 
| ResultSet | submit(String gremlin,
      String graphOrTraversalSource)Submits a Gremlin script to the server and returns a  ResultSetonce the write of the request is
 complete. | 
| ResultSet | submit(String gremlin,
      String graphOrTraversalSource,
      Map<String,Object> parameters)Submits a Gremlin script and bound parameters to the server and returns a  ResultSetonce the write of
 the request is complete. | 
buildMessage, close, getCluster, getSettings, init, makeDefaultAliasMap, submit, submit, submit, submit, submit, submit, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsyncprotected ConcurrentMap<Host,org.apache.tinkerpop.gremlin.driver.ConnectionPool> hostConnectionPools
public ResultSet submit(String gremlin, String graphOrTraversalSource)
ResultSet once the write of the request is
 complete.gremlin - the gremlin script to executepublic ResultSet submit(String gremlin, String graphOrTraversalSource, Map<String,Object> parameters)
ResultSet once the write of
 the request is complete.  If a script is to be executed repeatedly with slightly different arguments, prefer
 this method to concatenating a Gremlin script from dynamically produced strings and sending it to
 Client.submit(String).  Parameterized scripts will perform better.gremlin - the gremlin script to executeparameters - a map of parameters that will be bound to the script on executiongraphOrTraversalSource - rebinds the specified global Gremlin Server variable to "g"public Client alias(String graphOrTraversalSource)
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.public Client alias(Map<String,String> aliases)
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.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
LoadBalancingStrategy to choose the best Host and then selects the best connection
 from that host's connection pool.chooseConnection in class ClientTimeoutExceptionorg.apache.tinkerpop.gremlin.driver.exception.ConnectionExceptionprotected void initializeImplementation()
initializeImplementation in class Clientpublic CompletableFuture<Void> closeAsync()
closeAsync in class ClientCopyright © 2013–2021 Apache Software Foundation. All rights reserved.