public static class ArangoDB.Builder extends InternalArangoDBBuilder
ArangoDB.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 |
|---|---|
ArangoDB.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.
|
ArangoDB.Builder |
acquireHostListInterval(Integer acquireHostListInterval)
Setting the Interval for acquireHostList
|
ArangoDB |
build()
Returns an instance of
ArangoDB. |
ArangoDB.Builder |
chunksize(Integer chunksize)
Sets the chunk size when
Protocol.VST is used. |
ArangoDB.Builder |
connectionTtl(Long connectionTtl)
Set the maximum time to life of a connection.
|
ArangoDB.Builder |
host(String host,
int port)
Adds a host to connect to.
|
ArangoDB.Builder |
jwt(String jwt)
Sets the JWT for the user authentication.
|
ArangoDB.Builder |
keepAliveInterval(Integer keepAliveInterval)
Set the keep-alive interval for VST connections.
|
ArangoDB.Builder |
loadBalancingStrategy(LoadBalancingStrategy loadBalancingStrategy)
Sets the load balancing strategy to be used in an ArangoDB cluster setup.
|
ArangoDB.Builder |
loadProperties(ArangoConfigProperties properties) |
ArangoDB.Builder |
maxConnections(Integer maxConnections)
Sets the maximum number of connections the built in connection pool will open per host.
|
ArangoDB.Builder |
password(String password)
Sets the password for the user for authentication.
|
ArangoDB.Builder |
responseQueueTimeSamples(Integer responseQueueTimeSamples)
Setting the amount of samples kept for queue time metrics
|
ArangoDB.Builder |
serde(ArangoSerde serde)
Sets the serde for the user data.
|
ArangoDB.Builder |
sslContext(SSLContext sslContext)
Sets the SSL context to be used when
true is passed through useSsl(Boolean). |
ArangoDB.Builder |
timeout(Integer timeout)
Sets the connection and request timeout in milliseconds.
|
ArangoDB.Builder |
useProtocol(Protocol protocol) |
ArangoDB.Builder |
user(String user)
Sets the username to use for authentication.
|
ArangoDB.Builder |
useSsl(Boolean useSsl)
If set to
true SSL will be used when connecting to an ArangoDB server. |
ArangoDB.Builder |
verifyHost(Boolean verifyHost)
Set whether hostname verification is enabled
|
createHostHandler, createHostList, createHostResolver, doLoadProperties, serdeProvider, setAcquireHostList, setAcquireHostListInterval, setChunkSize, setConnectionTtl, setHost, setJwt, setKeepAliveInterval, setLoadBalancingStrategy, setMaxConnections, setPassword, setResponseQueueTimeSamples, setSslContext, setTimeout, setUser, setUserDataSerde, setUseSsl, setVerifyHostpublic ArangoDB.Builder loadProperties(ArangoConfigProperties properties)
public ArangoDB.Builder useProtocol(Protocol protocol)
public ArangoDB.Builder host(String host, int port)
host - address of the hostport - port of the hostArangoDB.Builderpublic ArangoDB.Builder timeout(Integer timeout)
timeout - timeout in millisecondsArangoDB.Builderpublic ArangoDB.Builder user(String user)
user - the user in the database (default: root)ArangoDB.Builderpublic ArangoDB.Builder password(String password)
password - the password of the user in the database (default: null)ArangoDB.Builderpublic ArangoDB.Builder jwt(String jwt)
jwt - token to use (default: null)ArangoDB.Builderpublic ArangoDB.Builder useSsl(Boolean useSsl)
true SSL will be used when connecting to an ArangoDB server.useSsl - whether or not use SSL (default: false)ArangoDB.Builderpublic ArangoDB.Builder sslContext(SSLContext sslContext)
true is passed through useSsl(Boolean).sslContext - SSL context to be usedArangoDB.Builderpublic ArangoDB.Builder verifyHost(Boolean verifyHost)
verifyHost - true if enabledArangoDB.Builderpublic ArangoDB.Builder chunksize(Integer chunksize)
Protocol.VST is used.chunksize - size of a chunk in bytesArangoDB.Builderpublic ArangoDB.Builder maxConnections(Integer maxConnections)
Defaults:
Protocol.VST== 1Protocol.HTTP_JSON== 20Protocol.HTTP_VPACK== 20
maxConnections - max number of connectionsArangoDB.Builderpublic ArangoDB.Builder connectionTtl(Long connectionTtl)
connectionTtl - the maximum time to life of a connection in millisecondsArangoDB.Builderpublic ArangoDB.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 secondsArangoDB.Builderpublic ArangoDB.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)ArangoDB.Builderpublic ArangoDB.Builder acquireHostListInterval(Integer acquireHostListInterval)
acquireHostListInterval - Interval in millisecondsArangoDB.Builderpublic ArangoDB.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.NONEArangoDB.Builderpublic ArangoDB.Builder responseQueueTimeSamples(Integer responseQueueTimeSamples)
responseQueueTimeSamples - amount of samples to keepArangoDB.Builderpublic ArangoDB.Builder serde(ArangoSerde serde)
ArangoDB.execute(Request, Class)
However, note that the following types will always be serialized and deserialized using the internal serde:
- JsonNode
- RawJson
- RawBytes
- BaseDocument
- BaseEdgeDocument
serde - custom serde for the user dataArangoDB.BuilderCopyright © 2016–2023 ArangoDB GmbH. All rights reserved.