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, setVerifyHost
public 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.Builder
public ArangoDB.Builder timeout(Integer timeout)
timeout
- timeout in millisecondsArangoDB.Builder
public ArangoDB.Builder user(String user)
user
- the user in the database (default: root
)ArangoDB.Builder
public ArangoDB.Builder password(String password)
password
- the password of the user in the database (default: null
)ArangoDB.Builder
public ArangoDB.Builder jwt(String jwt)
jwt
- token to use (default: null
)ArangoDB.Builder
public 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.Builder
public ArangoDB.Builder sslContext(SSLContext sslContext)
true
is passed through useSsl(Boolean)
.sslContext
- SSL context to be usedArangoDB.Builder
public ArangoDB.Builder verifyHost(Boolean verifyHost)
verifyHost
- true
if enabledArangoDB.Builder
public ArangoDB.Builder chunksize(Integer chunksize)
Protocol.VST
is used.chunksize
- size of a chunk in bytesArangoDB.Builder
public ArangoDB.Builder maxConnections(Integer maxConnections)
Defaults:
Protocol.VST
== 1Protocol.HTTP_JSON
== 20Protocol.HTTP_VPACK
== 20
maxConnections
- max number of connectionsArangoDB.Builder
public ArangoDB.Builder connectionTtl(Long connectionTtl)
connectionTtl
- the maximum time to life of a connection in millisecondsArangoDB.Builder
public 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.Builder
public 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.Builder
public ArangoDB.Builder acquireHostListInterval(Integer acquireHostListInterval)
acquireHostListInterval
- Interval in millisecondsArangoDB.Builder
public 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.NONE
ArangoDB.Builder
public ArangoDB.Builder responseQueueTimeSamples(Integer responseQueueTimeSamples)
responseQueueTimeSamples
- amount of samples to keepArangoDB.Builder
public 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.Builder
Copyright © 2016–2023 ArangoDB GmbH. All rights reserved.