public static class ArangoDBAsync.Builder extends InternalArangoDBBuilder
ArangoDBAsync
.acquireHostList, acquireHostListInterval, chunkSize, connectionTtl, hosts, jwt, keepAliveInterval, loadBalancingStrategy, maxConnections, password, protocol, responseQueueTimeSamples, sslContext, timeout, user, userDataSerde, useSsl, verifyHost
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ArangoDBAsync.Builder |
acquireHostList(Boolean acquireHostList)
Whether or not the driver should acquire a list of available coordinators in an ArangoDB cluster or a single
server with active failover.
|
ArangoDBAsync |
build()
Returns an instance of
ArangoDBAsync . |
ArangoDBAsync.Builder |
chunksize(Integer chunksize)
Sets the chunk size when
Protocol.VST is used. |
ArangoDBAsync.Builder |
connectionTtl(Long connectionTtl)
Set the maximum time to life of a connection.
|
ArangoDBAsync.Builder |
host(String host,
int port)
Adds a host to connect to.
|
ArangoDBAsync.Builder |
jwt(String jwt)
Sets the JWT for the user authentication.
|
ArangoDBAsync.Builder |
keepAliveInterval(Integer keepAliveInterval)
Set the keep-alive interval for VST connections.
|
ArangoDBAsync.Builder |
loadBalancingStrategy(LoadBalancingStrategy loadBalancingStrategy)
Sets the load balancing strategy to be used in an ArangoDB cluster setup.
|
ArangoDBAsync.Builder |
loadProperties(ArangoConfigProperties config) |
ArangoDBAsync.Builder |
maxConnections(Integer maxConnections)
Sets the maximum number of connections the built in connection pool will open.
|
ArangoDBAsync.Builder |
password(String password)
Sets the password for the user for authentication.
|
ArangoDBAsync.Builder |
responseQueueTimeSamples(Integer responseQueueTimeSamples)
Setting the amount of samples kept for queue time metrics
|
ArangoDBAsync.Builder |
serializer(ArangoSerde serialization)
Replace the built-in serializer/deserializer with the given one.
|
ArangoDBAsync.Builder |
sslContext(SSLContext sslContext)
Sets the SSL context to be used when
true is passed through useSsl(Boolean) . |
ArangoDBAsync.Builder |
timeout(Integer timeout)
Sets the timeout in milliseconds.
|
ArangoDBAsync.Builder |
user(String user)
Sets the username to use for authentication.
|
ArangoDBAsync.Builder |
useSsl(Boolean useSsl)
If set to
true SSL will be used when connecting to an ArangoDB server. |
createHostHandler, createHostList, createHostResolver, doLoadProperties, serdeProvider, setAcquireHostList, setAcquireHostListInterval, setChunkSize, setConnectionTtl, setHost, setJwt, setKeepAliveInterval, setLoadBalancingStrategy, setMaxConnections, setPassword, setResponseQueueTimeSamples, setSslContext, setTimeout, setUser, setUserDataSerde, setUseSsl, setVerifyHost
public ArangoDBAsync.Builder loadProperties(ArangoConfigProperties config)
public ArangoDBAsync.Builder host(String host, int port)
host
- address of the hostport
- port of the hostArangoDBAsync.Builder
public ArangoDBAsync.Builder timeout(Integer timeout)
timeout
- timeout in millisecondsArangoDBAsync.Builder
public ArangoDBAsync.Builder user(String user)
user
- the user in the database (default: root
)ArangoDBAsync.Builder
public ArangoDBAsync.Builder password(String password)
password
- the password of the user in the database (default: null
)ArangoDBAsync.Builder
public ArangoDBAsync.Builder jwt(String jwt)
jwt
- token to use (default: null
)ArangoDBAsync.Builder
public ArangoDBAsync.Builder useSsl(Boolean useSsl)
true
SSL will be used when connecting to an ArangoDB server.useSsl
- whether or not use SSL (default: false
)ArangoDBAsync.Builder
public ArangoDBAsync.Builder sslContext(SSLContext sslContext)
true
is passed through useSsl(Boolean)
.sslContext
- SSL context to be usedArangoDBAsync.Builder
public ArangoDBAsync.Builder chunksize(Integer chunksize)
Protocol.VST
is used.chunksize
- size of a chunk in bytesArangoDBAsync.Builder
public ArangoDBAsync.Builder maxConnections(Integer maxConnections)
In an ArangoDB cluster setup with LoadBalancingStrategy.ROUND_ROBIN
set, this value should be at
least as high as the number of ArangoDB coordinators in the cluster.
maxConnections
- max number of connections (default: 1)ArangoDBAsync.Builder
public ArangoDBAsync.Builder connectionTtl(Long connectionTtl)
connectionTtl
- the maximum time to life of a connection.ArangoDBAsync.Builder
public ArangoDBAsync.Builder keepAliveInterval(Integer keepAliveInterval)
keepAliveInterval
seconds, to avoid to be closed due to inactivity by the server (or by the external
environment, eg. firewall, intermediate routers, operating system).keepAliveInterval
- interval in secondsArangoDBAsync.Builder
public ArangoDBAsync.Builder acquireHostList(Boolean acquireHostList)
true
to enable automatic master discovery.
The host list will be used for failover and load balancing.
acquireHostList
- whether or not automatically acquire a list of available hosts (default: false)ArangoDBAsync.Builder
public ArangoDBAsync.Builder responseQueueTimeSamples(Integer responseQueueTimeSamples)
responseQueueTimeSamples
- amount of samples to keepArangoDBAsync.Builder
public ArangoDBAsync.Builder loadBalancingStrategy(LoadBalancingStrategy loadBalancingStrategy)
LoadBalancingStrategy.NONE
or not set at all, since that
would be the default.loadBalancingStrategy
- the load balancing strategy to be used (default:
LoadBalancingStrategy.NONE
ArangoDBAsync.Builder
public ArangoDBAsync.Builder serializer(ArangoSerde serialization)
ATTENTION!: Any registered custom serializer/deserializer or module will be ignored.
serialization
- custom serializer/deserializerArangoDBAsync.Builder
public ArangoDBAsync build()
ArangoDBAsync
.ArangoDBAsync
Copyright © 2016–2023 ArangoDB GmbH. All rights reserved.