Modifier and Type | Method and Description |
---|---|
Cluster.Builder |
addContactPoint(String address)
Adds the address of a Gremlin Server to the list of servers a
Client will try to contact to send
requests to. |
Cluster.Builder |
addContactPoints(String... addresses)
Add one or more the addresses of a Gremlin Servers to the list of servers a
Client will try to
contact to send requests to. |
Cluster.Builder |
authProperties(AuthProperties authProps)
Specifies parameters for authentication to Gremlin Server.
|
Cluster.Builder |
channelizer(Class channelizerClass)
Specify the
Channelizer implementation to use on the client when creating a Connection . |
Cluster.Builder |
channelizer(String channelizerClass)
Specify the
Channelizer implementation to use on the client when creating a Connection . |
Cluster |
create() |
Cluster.Builder |
credentials(String username,
String password)
Sets the
AuthProperties.Property.USERNAME and AuthProperties.Property.PASSWORD properties
for authentication to Gremlin Server. |
Cluster.Builder |
enableSsl(boolean enable)
Enables connectivity over SSL - note that the server should be configured with SSL turned on for this
setting to work properly.
|
Cluster.Builder |
jaasEntry(String jaasEntry)
Sets the
AuthProperties.Property.JAAS_ENTRY properties for authentication to Gremlin Server. |
Cluster.Builder |
loadBalancingStrategy(LoadBalancingStrategy loadBalancingStrategy)
Specifies the load balancing strategy to use on the client side.
|
Cluster.Builder |
maxConnectionPoolSize(int maxSize)
The maximum size that the
ConnectionPool can grow. |
Cluster.Builder |
maxContentLength(int maxContentLength)
The maximum size in bytes of any request sent to the server.
|
Cluster.Builder |
maxInProcessPerConnection(int maxInProcessPerConnection)
The maximum number of in-flight requests that can occur on a
Connection . |
Cluster.Builder |
maxSimultaneousUsagePerConnection(int maxSimultaneousUsagePerConnection)
The maximum number of times that a
Connection can be borrowed from the pool simultaneously. |
Cluster.Builder |
maxWaitForConnection(int maxWait)
The maximum amount of time to wait for a connection to be borrowed from the connection pool.
|
Cluster.Builder |
maxWaitForSessionClose(int maxWait)
If the connection is using a "session" this setting represents the amount of time in milliseconds to wait
for that session to close before timing out where the default value is 3000.
|
Cluster.Builder |
minConnectionPoolSize(int minSize)
The minimum size of the
ConnectionPool . |
Cluster.Builder |
minInProcessPerConnection(int minInProcessPerConnection)
The minimum number of in-flight requests that can occur on a
Connection before it is considered
for closing on return to the ConnectionPool . |
Cluster.Builder |
minSimultaneousUsagePerConnection(int minSimultaneousUsagePerConnection)
The minimum number of times that a
Connection should be borrowed from the pool before it falls
under consideration for closing. |
Cluster.Builder |
nioPoolSize(int nioPoolSize)
Size of the pool for handling request/response operations.
|
Cluster.Builder |
port(int port)
Sets the port that the Gremlin Servers will be listening on.
|
Cluster.Builder |
protocol(String protocol)
Sets the
AuthProperties.Property.PROTOCOL properties for authentication to Gremlin Server. |
Cluster.Builder |
reconnectInterval(int interval)
Time in milliseconds to wait between retries when attempting to reconnect to a dead host.
|
Cluster.Builder |
reconnectIntialDelay(int initialDelay)
Time in milliseconds to wait before attempting to reconnect to a dead host after it has been marked dead.
|
Cluster.Builder |
resultIterationBatchSize(int size)
Override the server setting that determines how many results are returned per batch.
|
Cluster.Builder |
serializer(MessageSerializer serializer)
Sets the
MessageSerializer to use. |
Cluster.Builder |
serializer(org.apache.tinkerpop.gremlin.driver.ser.Serializers mimeType)
Set the
MessageSerializer to use via the Serializers enum. |
Cluster.Builder |
serializer(String mimeType)
Set the
MessageSerializer to use given its MIME type. |
Cluster.Builder |
trustCertificateChainFile(String certificateChainFile)
File location for a SSL Certificate Chain to use when SSL is enabled.
|
Cluster.Builder |
workerPoolSize(int workerPoolSize)
Size of the pool for handling background work.
|
public Cluster.Builder nioPoolSize(int nioPoolSize)
public Cluster.Builder workerPoolSize(int workerPoolSize)
public Cluster.Builder serializer(String mimeType)
MessageSerializer
to use given its MIME type. Note that setting this value this way
will not allow specific configuration of the serializer itself. If specific configuration is required
please use serializer(MessageSerializer)
.public Cluster.Builder serializer(org.apache.tinkerpop.gremlin.driver.ser.Serializers mimeType)
MessageSerializer
to use via the Serializers
enum. If specific configuration is
required please use serializer(MessageSerializer)
.public Cluster.Builder serializer(MessageSerializer serializer)
MessageSerializer
to use.public Cluster.Builder enableSsl(boolean enable)
public Cluster.Builder trustCertificateChainFile(String certificateChainFile)
TrustManager
will be established with a self-signed certificate which is NOT
suitable for production purposes.public Cluster.Builder minInProcessPerConnection(int minInProcessPerConnection)
Connection
before it is considered
for closing on return to the ConnectionPool
.public Cluster.Builder maxInProcessPerConnection(int maxInProcessPerConnection)
Connection
. This represents an
indication of how busy a Connection
is allowed to be. This number is linked to the
maxSimultaneousUsagePerConnection
setting, but is slightly different in that it refers to
the total number of requests on a Connection
. In other words, a Connection
might
be borrowed once to have multiple requests executed against it. This number controls the maximum
number of requests whereas maxInProcessPerConnection
controls the times borrowed.public Cluster.Builder maxSimultaneousUsagePerConnection(int maxSimultaneousUsagePerConnection)
Connection
can be borrowed from the pool simultaneously.
This represents an indication of how busy a Connection
is allowed to be. Set too large and the
Connection
may queue requests too quickly, rather than wait for an available Connection
or create a fresh one. If set too small, the Connection
will show as busy very quickly thus
forcing waits for available Connection
instances in the pool when there is more capacity available.public Cluster.Builder minSimultaneousUsagePerConnection(int minSimultaneousUsagePerConnection)
Connection
should be borrowed from the pool before it falls
under consideration for closing. If a Connection
is not busy and the
minConnectionPoolSize
is exceeded, then there is no reason to keep that connection open. Set
too large and Connection
that isn't busy will continue to consume resources when it is not being
used. Set too small and Connection
instances will be destroyed when the driver might still be
busy.public Cluster.Builder maxConnectionPoolSize(int maxSize)
ConnectionPool
can grow.public Cluster.Builder minConnectionPoolSize(int minSize)
ConnectionPool
. When the Client
is started, Connection
objects will be initially constructed to this size.public Cluster.Builder resultIterationBatchSize(int size)
public Cluster.Builder maxWaitForConnection(int maxWait)
public Cluster.Builder maxWaitForSessionClose(int maxWait)
public Cluster.Builder maxContentLength(int maxContentLength)
public Cluster.Builder channelizer(String channelizerClass)
Channelizer
implementation to use on the client when creating a Connection
.public Cluster.Builder channelizer(Class channelizerClass)
Channelizer
implementation to use on the client when creating a Connection
.public Cluster.Builder reconnectIntialDelay(int initialDelay)
public Cluster.Builder reconnectInterval(int interval)
public Cluster.Builder loadBalancingStrategy(LoadBalancingStrategy loadBalancingStrategy)
public Cluster.Builder authProperties(AuthProperties authProps)
public Cluster.Builder credentials(String username, String password)
AuthProperties.Property.USERNAME
and AuthProperties.Property.PASSWORD
properties
for authentication to Gremlin Server.public Cluster.Builder protocol(String protocol)
AuthProperties.Property.PROTOCOL
properties for authentication to Gremlin Server.public Cluster.Builder jaasEntry(String jaasEntry)
AuthProperties.Property.JAAS_ENTRY
properties for authentication to Gremlin Server.public Cluster.Builder addContactPoint(String address)
Client
will try to contact to send
requests to. The address should be parseable by InetAddress.getByName(String)
. That's the only
validation performed at this point. No connection to the host is attempted.public Cluster.Builder addContactPoints(String... addresses)
Client
will try to
contact to send requests to. The address should be parseable by InetAddress.getByName(String)
.
That's the only validation performed at this point. No connection to the host is attempted.public Cluster.Builder port(int port)
public Cluster create()
Copyright © 2013–2016 Apache Software Foundation. All rights reserved.