| Modifier and Type | Field and Description |
|---|---|
protected Protocol |
protocol |
acquireHostList, acquireHostListInterval, chunksize, connectionTtl, customSerializer, deserializer, host, hostnameVerifier, hosts, httpCookieSpec, httpRequestRetryHandler, keepAliveInterval, loadBalancingStrategy, maxConnections, password, serializer, sslContext, timeout, user, useSsl, vpackBuilder, vpackParserBuilder| 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
|
<A extends Annotation> |
annotationFieldFilter(Class<A> type,
com.arangodb.velocypack.VPackAnnotationFieldFilter<A> fieldFilter)
Register a custom
VPackAnnotationFieldFilter for a specific type to be used within the internal
serialization process. |
<A extends Annotation> |
annotationFieldNaming(Class<A> type,
com.arangodb.velocypack.VPackAnnotationFieldNaming<A> fieldNaming)
Register a custom
VPackAnnotationFieldNaming for a specific type to be used within the internal
serialization process. |
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 |
hostnameVerifier(HostnameVerifier hostnameVerifier)
Sets the
HostnameVerifier to be used when using ssl with http protocol. |
ArangoDB.Builder |
httpRequestRetryHandler(org.apache.http.client.HttpRequestRetryHandler httpRequestRetryHandler)
Sets the
HttpRequestRetryHandler to be used when using http protocol. |
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(InputStream in) |
protected void |
loadProperties(Properties 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.
|
<T> ArangoDB.Builder |
registerDeserializer(Class<T> clazz,
com.arangodb.velocypack.VPackDeserializer<T> deserializer)
Register a custom
VPackDeserializer for a specific type to be used within the internal serialization
process. |
<T> ArangoDB.Builder |
registerEnclosingSerializer(Class<T> clazz,
com.arangodb.velocypack.VPackSerializer<T> serializer)
Register a special serializer for a member class which can only be identified by its enclosing class.
|
<T> ArangoDB.Builder |
registerInstanceCreator(Class<T> clazz,
com.arangodb.velocypack.VPackInstanceCreator<T> creator)
Register a custom
VPackInstanceCreator for a specific type to be used within the internal
serialization process. |
ArangoDB.Builder |
registerJsonDeserializer(String attribute,
com.arangodb.velocypack.ValueType type,
com.arangodb.velocypack.VPackJsonDeserializer deserializer)
Register a custom
VPackJsonDeserializer for a specific type and attribute name to be used within the
internal serialization process. |
ArangoDB.Builder |
registerJsonDeserializer(com.arangodb.velocypack.ValueType type,
com.arangodb.velocypack.VPackJsonDeserializer deserializer)
Register a custom
VPackJsonDeserializer for a specific type to be used within the internal
serialization process. |
ArangoDB.Builder |
registerJsonModule(com.arangodb.velocypack.VPackParserModule module)
Register a
VPackParserModule to be used within the internal serialization process. |
ArangoDB.Builder |
registerJsonModules(com.arangodb.velocypack.VPackParserModule... modules)
Register a list of
VPackParserModule to be used within the internal serialization process. |
<T> ArangoDB.Builder |
registerJsonSerializer(Class<T> clazz,
com.arangodb.velocypack.VPackJsonSerializer<T> serializer)
Register a custom
VPackJsonSerializer for a specific type to be used within the internal
serialization process. |
<T> ArangoDB.Builder |
registerJsonSerializer(String attribute,
Class<T> clazz,
com.arangodb.velocypack.VPackJsonSerializer<T> serializer)
Register a custom
VPackJsonSerializer for a specific type and attribute name to be used within the
internal serialization process. |
ArangoDB.Builder |
registerModule(com.arangodb.velocypack.VPackModule module)
Register a
VPackModule to be used within the internal serialization process. |
ArangoDB.Builder |
registerModules(com.arangodb.velocypack.VPackModule... modules)
Register a list of
VPackModule to be used within the internal serialization process. |
<T> ArangoDB.Builder |
registerSerializer(Class<T> clazz,
com.arangodb.velocypack.VPackSerializer<T> serializer)
Register a custom
VPackSerializer for a specific type to be used within the internal serialization
process. |
ArangoDB.Builder |
serializer(ArangoSerialization serialization)
Replace the built-in serializer/deserializer with the given one.
|
ArangoDB.Builder |
setDeserializer(ArangoDeserializer deserializer)
Deprecated.
use
serializer(ArangoSerialization) instead |
ArangoDB.Builder |
setSerializer(ArangoSerializer serializer)
Deprecated.
use
serializer(ArangoSerialization) instead |
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. |
createHostHandler, createHostList, createHostResolver, deserializer, getProperty, serializer, setAcquireHostList, setAcquireHostListInterval, setChunksize, setConnectionTtl, setHost, setHostnameVerifier, setHttpRequestRetryHandler, setKeepAliveInterval, setLoadBalancingStrategy, setMaxConnections, setPassword, setSerializer, setSslContext, setTimeout, setUser, setUseSslprotected Protocol protocol
protected void loadProperties(Properties properties)
loadProperties in class com.arangodb.internal.InternalArangoDBBuilderpublic ArangoDB.Builder useProtocol(Protocol protocol)
public ArangoDB.Builder loadProperties(InputStream in) throws ArangoDBException
loadProperties in class com.arangodb.internal.InternalArangoDBBuilderArangoDBExceptionpublic 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 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 hostnameVerifier(HostnameVerifier hostnameVerifier)
HostnameVerifier to be used when using ssl with http protocol.hostnameVerifier - HostnameVerifier to be usedArangoDB.Builderpublic ArangoDB.Builder httpRequestRetryHandler(org.apache.http.client.HttpRequestRetryHandler httpRequestRetryHandler)
HttpRequestRetryHandler to be used when using http protocol.httpRequestRetryHandler - HttpRequestRetryHandler to be usedArangoDB.Builder
public 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)
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 SecondsArangoDB.Builderpublic ArangoDB.Builder loadBalancingStrategy(LoadBalancingStrategy loadBalancingStrategy)
loadBalancingStrategy - the load balancing strategy to be used (default: LoadBalancingStrategy.NONEArangoDB.Builderpublic <T> ArangoDB.Builder registerSerializer(Class<T> clazz, com.arangodb.velocypack.VPackSerializer<T> serializer)
VPackSerializer for a specific type to be used within the internal serialization
process.
Attention:can not be used together with serializer(ArangoSerialization)
clazz - the type the serializer should be registered forserializer - serializer to registerArangoDB.Builderpublic <T> ArangoDB.Builder registerEnclosingSerializer(Class<T> clazz, com.arangodb.velocypack.VPackSerializer<T> serializer)
Attention:can not be used together with serializer(ArangoSerialization)
clazz - the type of the enclosing classserializer - serializer to registerArangoDB.Builderpublic <T> ArangoDB.Builder registerDeserializer(Class<T> clazz, com.arangodb.velocypack.VPackDeserializer<T> deserializer)
VPackDeserializer for a specific type to be used within the internal serialization
process.
Attention:can not be used together with serializer(ArangoSerialization)
clazz - the type the serializer should be registered fordeserializer - ArangoDB.Builderpublic <T> ArangoDB.Builder registerInstanceCreator(Class<T> clazz, com.arangodb.velocypack.VPackInstanceCreator<T> creator)
VPackInstanceCreator for a specific type to be used within the internal
serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
clazz - the type the instance creator should be registered forcreator - ArangoDB.Builderpublic ArangoDB.Builder registerJsonDeserializer(com.arangodb.velocypack.ValueType type, com.arangodb.velocypack.VPackJsonDeserializer deserializer)
VPackJsonDeserializer for a specific type to be used within the internal
serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
type - the type the serializer should be registered fordeserializer - ArangoDB.Builderpublic ArangoDB.Builder registerJsonDeserializer(String attribute, com.arangodb.velocypack.ValueType type, com.arangodb.velocypack.VPackJsonDeserializer deserializer)
VPackJsonDeserializer for a specific type and attribute name to be used within the
internal serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
attribute - type - the type the serializer should be registered fordeserializer - ArangoDB.Builderpublic <T> ArangoDB.Builder registerJsonSerializer(Class<T> clazz, com.arangodb.velocypack.VPackJsonSerializer<T> serializer)
VPackJsonSerializer for a specific type to be used within the internal
serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
clazz - the type the serializer should be registered forserializer - ArangoDB.Builderpublic <T> ArangoDB.Builder registerJsonSerializer(String attribute, Class<T> clazz, com.arangodb.velocypack.VPackJsonSerializer<T> serializer)
VPackJsonSerializer for a specific type and attribute name to be used within the
internal serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
attribute - clazz - the type the serializer should be registered forserializer - ArangoDB.Builderpublic <A extends Annotation> ArangoDB.Builder annotationFieldFilter(Class<A> type, com.arangodb.velocypack.VPackAnnotationFieldFilter<A> fieldFilter)
VPackAnnotationFieldFilter for a specific type to be used within the internal
serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
type - the type the serializer should be registered forfieldFilter - ArangoDB.Builderpublic <A extends Annotation> ArangoDB.Builder annotationFieldNaming(Class<A> type, com.arangodb.velocypack.VPackAnnotationFieldNaming<A> fieldNaming)
VPackAnnotationFieldNaming for a specific type to be used within the internal
serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
type - the type the serializer should be registered forfieldNaming - ArangoDB.Builderpublic ArangoDB.Builder registerModule(com.arangodb.velocypack.VPackModule module)
VPackModule to be used within the internal serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
module - module to registerArangoDB.Builderpublic ArangoDB.Builder registerModules(com.arangodb.velocypack.VPackModule... modules)
VPackModule to be used within the internal serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
modules - modules to registerArangoDB.Builderpublic ArangoDB.Builder registerJsonModule(com.arangodb.velocypack.VPackParserModule module)
VPackParserModule to be used within the internal serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
module - module to registerArangoDB.Builderpublic ArangoDB.Builder registerJsonModules(com.arangodb.velocypack.VPackParserModule... modules)
VPackParserModule to be used within the internal serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
modules - modules to registerArangoDB.Builder@Deprecated public ArangoDB.Builder setSerializer(ArangoSerializer serializer)
serializer(ArangoSerialization) instead
ATTENTION!: Use at your own risk
serializer - custom serializerArangoDB.Builder@Deprecated public ArangoDB.Builder setDeserializer(ArangoDeserializer deserializer)
serializer(ArangoSerialization) instead
ATTENTION!: Use at your own risk
deserializer - custom deserializerArangoDB.Builderpublic ArangoDB.Builder serializer(ArangoSerialization serialization)
ATTENTION!: Any registered custom serializer/deserializer or module will be ignored.
serialization - custom serializer/deserializerArangoDB.BuilderCopyright © 2016–2021 ArangoDB GmbH. All rights reserved.