public abstract class Client extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Client.ClusteredClient
A
Client implementation that does not operate in a session. |
static class |
Client.SessionedClient
A
Client implementation that operates in the context of a session. |
Modifier and Type | Field and Description |
---|---|
protected Cluster |
cluster |
protected boolean |
initialized |
Modifier and Type | Method and Description |
---|---|
RequestMessage |
buildMessage(RequestMessage.Builder builder)
Makes any final changes to the builder and returns the constructed
RequestMessage . |
protected abstract org.apache.tinkerpop.gremlin.driver.Connection |
chooseConnection(RequestMessage msg)
Chooses a
Connection to write the message to. |
void |
close() |
abstract CompletableFuture<Void> |
closeAsync()
Asynchronous close of the
Client . |
Client |
init() |
protected abstract void |
initializeImplementation()
Called in the
init() method. |
ResultSet |
submit(String gremlin) |
ResultSet |
submit(String gremlin,
Map<String,Object> parameters) |
CompletableFuture<ResultSet> |
submitAsync(RequestMessage msg) |
CompletableFuture<ResultSet> |
submitAsync(String gremlin) |
CompletableFuture<ResultSet> |
submitAsync(String gremlin,
Map<String,Object> parameters) |
protected final Cluster cluster
protected volatile boolean initialized
public RequestMessage buildMessage(RequestMessage.Builder builder)
RequestMessage
. Implementers
may choose to override this message to append data to the request before sending. By default, this method
will simply call the RequestMessage.Builder.create()
and return
the RequestMessage
.protected abstract void initializeImplementation()
init()
method.protected abstract org.apache.tinkerpop.gremlin.driver.Connection chooseConnection(RequestMessage msg) throws TimeoutException, ConnectionException
Connection
to write the message to.TimeoutException
ConnectionException
public abstract CompletableFuture<Void> closeAsync()
Client
.public Client init()
public CompletableFuture<ResultSet> submitAsync(String gremlin)
public CompletableFuture<ResultSet> submitAsync(String gremlin, Map<String,Object> parameters)
public CompletableFuture<ResultSet> submitAsync(RequestMessage msg)
public void close()
Copyright © 2013–2015 Apache Software Foundation. All rights reserved.