public static class ArangoDBAsync.Builder
extends com.arangodb.internal.InternalArangoDBBuilder
ArangoDBAsync
.acquireHostList, acquireHostListInterval, chunksize, connectionTtl, customSerializer, deserializer, host, hostnameVerifier, hosts, httpCookieSpec, httpRequestRetryHandler, jwt, keepAliveInterval, loadBalancingStrategy, maxConnections, password, responseQueueTimeSamples, serializer, sslContext, timeout, user, useSsl, vpackBuilder, vpackParserBuilder
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.
|
<A extends Annotation> |
annotationFieldFilter(Class<A> type,
com.arangodb.velocypack.VPackAnnotationFieldFilter<A> fieldFilter)
Deprecated.
Use
ArangoJack instead and register custom serializers and deserializers by implementing JsonSerializer and JsonDeserializer . |
<A extends Annotation> |
annotationFieldNaming(Class<A> type,
com.arangodb.velocypack.VPackAnnotationFieldNaming<A> fieldNaming)
Deprecated.
Use
ArangoJack instead and register custom serializers and deserializers by implementing JsonSerializer and JsonDeserializer . |
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(InputStream in) |
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.
|
<T> ArangoDBAsync.Builder |
registerDeserializer(Class<T> clazz,
com.arangodb.velocypack.VPackDeserializer<T> deserializer)
Deprecated.
Use
ArangoJack instead and register custom serializers and deserializers by implementing JsonSerializer and JsonDeserializer . |
<T> ArangoDBAsync.Builder |
registerEnclosingSerializer(Class<T> clazz,
com.arangodb.velocypack.VPackSerializer<T> serializer)
Deprecated.
Use
ArangoJack instead and register custom serializers and deserializers by implementing JsonSerializer and JsonDeserializer . |
<T> ArangoDBAsync.Builder |
registerInstanceCreator(Class<T> clazz,
com.arangodb.velocypack.VPackInstanceCreator<T> creator)
Deprecated.
Use
ArangoJack instead and register custom serializers and deserializers by implementing JsonSerializer and JsonDeserializer . |
ArangoDBAsync.Builder |
registerJsonDeserializer(String attribute,
com.arangodb.velocypack.ValueType type,
com.arangodb.velocypack.VPackJsonDeserializer deserializer)
Deprecated.
Use
ArangoJack instead and register custom serializers and deserializers by implementing JsonSerializer and JsonDeserializer . |
ArangoDBAsync.Builder |
registerJsonDeserializer(com.arangodb.velocypack.ValueType type,
com.arangodb.velocypack.VPackJsonDeserializer deserializer)
Deprecated.
Use
ArangoJack instead and register custom serializers and deserializers by implementing JsonSerializer and JsonDeserializer . |
ArangoDBAsync.Builder |
registerJsonModule(com.arangodb.velocypack.VPackParserModule module)
Deprecated.
Use
ArangoJack instead and register custom modules. |
ArangoDBAsync.Builder |
registerJsonModules(com.arangodb.velocypack.VPackParserModule... modules)
Deprecated.
Use
ArangoJack instead and register custom modules. |
<T> ArangoDBAsync.Builder |
registerJsonSerializer(Class<T> clazz,
com.arangodb.velocypack.VPackJsonSerializer<T> serializer)
Deprecated.
Use
ArangoJack instead and register custom serializers and deserializers by implementing JsonSerializer and JsonDeserializer . |
<T> ArangoDBAsync.Builder |
registerJsonSerializer(String attribute,
Class<T> clazz,
com.arangodb.velocypack.VPackJsonSerializer<T> serializer)
Deprecated.
Use
ArangoJack instead and register custom serializers and deserializers by implementing JsonSerializer and JsonDeserializer . |
ArangoDBAsync.Builder |
registerModule(com.arangodb.velocypack.VPackModule module)
Deprecated.
Use
ArangoJack instead and register custom modules. |
ArangoDBAsync.Builder |
registerModules(com.arangodb.velocypack.VPackModule... modules)
Deprecated.
Use
ArangoJack instead and register custom modules. |
<T> ArangoDBAsync.Builder |
registerSerializer(Class<T> clazz,
com.arangodb.velocypack.VPackSerializer<T> serializer)
Deprecated.
Use
ArangoJack instead and register custom serializers and deserializers by implementing JsonSerializer and JsonDeserializer . |
ArangoDBAsync.Builder |
responseQueueTimeSamples(Integer responseQueueTimeSamples)
Setting the amount of samples kept for queue time metrics
|
ArangoDBAsync.Builder |
serializer(ArangoSerialization serialization)
Replace the built-in serializer/deserializer with the given one.
|
ArangoDBAsync.Builder |
setDeserializer(ArangoDeserializer deserializer)
Deprecated.
use
serializer(ArangoSerialization) instead |
ArangoDBAsync.Builder |
setSerializer(ArangoSerializer serializer)
Deprecated.
use
serializer(ArangoSerialization) instead |
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, deserializer, getProperty, loadProperties, serializer, setAcquireHostList, setAcquireHostListInterval, setChunksize, setConnectionTtl, setHost, setHostnameVerifier, setHttpRequestRetryHandler, setJwt, setKeepAliveInterval, setLoadBalancingStrategy, setMaxConnections, setPassword, setResponseQueueTimeSamples, setSerializer, setSslContext, setTimeout, setUser, setUseSsl
public ArangoDBAsync.Builder loadProperties(InputStream in) throws ArangoDBException
loadProperties
in class com.arangodb.internal.InternalArangoDBBuilder
ArangoDBException
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
@Deprecated public <T> ArangoDBAsync.Builder registerSerializer(Class<T> clazz, com.arangodb.velocypack.VPackSerializer<T> serializer)
ArangoJack
instead and register custom serializers and deserializers by implementing JsonSerializer
and JsonDeserializer
.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 registerArangoDBAsync.Builder
@Deprecated public <T> ArangoDBAsync.Builder registerEnclosingSerializer(Class<T> clazz, com.arangodb.velocypack.VPackSerializer<T> serializer)
ArangoJack
instead and register custom serializers and deserializers by implementing JsonSerializer
and JsonDeserializer
.
Attention:can not be used together with serializer(ArangoSerialization)
clazz
- the type of the enclosing classserializer
- serializer to registerArangoDBAsync.Builder
@Deprecated public <T> ArangoDBAsync.Builder registerDeserializer(Class<T> clazz, com.arangodb.velocypack.VPackDeserializer<T> deserializer)
ArangoJack
instead and register custom serializers and deserializers by implementing JsonSerializer
and JsonDeserializer
.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
- ArangoDBAsync.Builder
@Deprecated public <T> ArangoDBAsync.Builder registerInstanceCreator(Class<T> clazz, com.arangodb.velocypack.VPackInstanceCreator<T> creator)
ArangoJack
instead and register custom serializers and deserializers by implementing JsonSerializer
and JsonDeserializer
.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
- ArangoDBAsync.Builder
@Deprecated public ArangoDBAsync.Builder registerJsonDeserializer(com.arangodb.velocypack.ValueType type, com.arangodb.velocypack.VPackJsonDeserializer deserializer)
ArangoJack
instead and register custom serializers and deserializers by implementing JsonSerializer
and JsonDeserializer
.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
- ArangoDBAsync.Builder
@Deprecated public ArangoDBAsync.Builder registerJsonDeserializer(String attribute, com.arangodb.velocypack.ValueType type, com.arangodb.velocypack.VPackJsonDeserializer deserializer)
ArangoJack
instead and register custom serializers and deserializers by implementing JsonSerializer
and JsonDeserializer
.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
- ArangoDBAsync.Builder
@Deprecated public <T> ArangoDBAsync.Builder registerJsonSerializer(Class<T> clazz, com.arangodb.velocypack.VPackJsonSerializer<T> serializer)
ArangoJack
instead and register custom serializers and deserializers by implementing JsonSerializer
and JsonDeserializer
.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
- ArangoDBAsync.Builder
@Deprecated public <T> ArangoDBAsync.Builder registerJsonSerializer(String attribute, Class<T> clazz, com.arangodb.velocypack.VPackJsonSerializer<T> serializer)
ArangoJack
instead and register custom serializers and deserializers by implementing JsonSerializer
and JsonDeserializer
.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
- ArangoDBAsync.Builder
@Deprecated public <A extends Annotation> ArangoDBAsync.Builder annotationFieldFilter(Class<A> type, com.arangodb.velocypack.VPackAnnotationFieldFilter<A> fieldFilter)
ArangoJack
instead and register custom serializers and deserializers by implementing JsonSerializer
and JsonDeserializer
.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
- ArangoDBAsync.Builder
@Deprecated public <A extends Annotation> ArangoDBAsync.Builder annotationFieldNaming(Class<A> type, com.arangodb.velocypack.VPackAnnotationFieldNaming<A> fieldNaming)
ArangoJack
instead and register custom serializers and deserializers by implementing JsonSerializer
and JsonDeserializer
.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
- ArangoDBAsync.Builder
@Deprecated public ArangoDBAsync.Builder registerModule(com.arangodb.velocypack.VPackModule module)
ArangoJack
instead and register custom modules.VPackModule
to be used within the internal serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
module
- module to registerArangoDBAsync.Builder
@Deprecated public ArangoDBAsync.Builder registerModules(com.arangodb.velocypack.VPackModule... modules)
ArangoJack
instead and register custom modules.VPackModule
to be used within the internal serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
modules
- modules to registerArangoDBAsync.Builder
@Deprecated public ArangoDBAsync.Builder registerJsonModule(com.arangodb.velocypack.VPackParserModule module)
ArangoJack
instead and register custom modules.VPackParserModule
to be used within the internal serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
module
- module to registerArangoDBAsync.Builder
@Deprecated public ArangoDBAsync.Builder registerJsonModules(com.arangodb.velocypack.VPackParserModule... modules)
ArangoJack
instead and register custom modules.VPackParserModule
to be used within the internal serialization process.
Attention:can not be used together with serializer(ArangoSerialization)
modules
- modules to registerArangoDBAsync.Builder
@Deprecated public ArangoDBAsync.Builder setSerializer(ArangoSerializer serializer)
serializer(ArangoSerialization)
instead
ATTENTION!: Use at your own risk
serializer
- custom serializerArangoDBAsync.Builder
@Deprecated public ArangoDBAsync.Builder setDeserializer(ArangoDeserializer deserializer)
serializer(ArangoSerialization)
instead
ATTENTION!: Use at your own risk
deserializer
- custom deserializerArangoDBAsync.Builder
public ArangoDBAsync.Builder serializer(ArangoSerialization serialization)
ATTENTION!: Any registered custom serializer/deserializer or module will be ignored.
serialization
- custom serializer/deserializerArangoDBAsync.Builder
public ArangoDBAsync build()
ArangoDBAsync
.ArangoDBAsync
Copyright © 2016–2022 ArangoDB GmbH. All rights reserved.