Package com.eventstore.dbclient
Class EventStoreDBClientSettings
- java.lang.Object
-
- com.eventstore.dbclient.EventStoreDBClientSettings
-
public class EventStoreDBClientSettings extends java.lang.ObjectGathers all the settings related to a gRPC client with an EventStoreDB database. EventStoreDBClientSettings} can only be created when parsing a connection string. EventStoreDBClientSettings supports a wide range of settings. If a setting is not mentioned in the connection string, that setting default value is used.- maxDiscoverAttempts: 3
- discoveryInterval: 500
- gossipTimeout: 3
- nodePreference: leader
- tls: true
- tlsVerifyCert: true
- throwOnAppendFailure: true
- keepAliveTimeout: 10000
- keepAliveInterval: 10000
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConnectionSettingsBuilderbuilder()Return a connection settings builder configured with default properties.UserCredentialsgetDefaultCredentials()Default credentials used to authenticate requests.java.lang.LonggetDefaultDeadline()An optional length of time (in milliseconds) to use for gRPC deadlines.intgetDiscoveryInterval()How long to wait before retrying a new discovery process (in milliseconds).intgetGossipTimeout()How long to wait for the gossip request to time out (in seconds).Endpoint[]getHosts()The list of endpoints that the client uses to connect.longgetKeepAliveInterval()The amount of time (in milliseconds) to wait after which a keepalive ping is sent on the transport.longgetKeepAliveTimeout()The amount of time (in milliseconds) the sender of the keepalive ping waits for an acknowledgement.intgetMaxDiscoverAttempts()How many times to attempt connection before throwing.NodePreferencegetNodePreference()Preferred node type when picking a node within a cluster.booleanisDnsDiscover()If the dns discovery is enabled.booleanisThrowOnAppendFailure()If an exception is thrown, whether an append operation fails on optimistic concurrency error.booleanisTls()If secure mode is enabled.booleanisTlsVerifyCert()If secure mode is enabled, is certificate verification enabled.
-
-
-
Method Detail
-
isDnsDiscover
public boolean isDnsDiscover()
If the dns discovery is enabled.
-
getMaxDiscoverAttempts
public int getMaxDiscoverAttempts()
How many times to attempt connection before throwing.
-
getDiscoveryInterval
public int getDiscoveryInterval()
How long to wait before retrying a new discovery process (in milliseconds).
-
getGossipTimeout
public int getGossipTimeout()
How long to wait for the gossip request to time out (in seconds).
-
getNodePreference
public NodePreference getNodePreference()
Preferred node type when picking a node within a cluster.- Returns:
- selected node preference.
- See Also:
NodePreference
-
isTls
public boolean isTls()
If secure mode is enabled.
-
isTlsVerifyCert
public boolean isTlsVerifyCert()
If secure mode is enabled, is certificate verification enabled.
-
isThrowOnAppendFailure
public boolean isThrowOnAppendFailure()
If an exception is thrown, whether an append operation fails on optimistic concurrency error.
-
getDefaultCredentials
public UserCredentials getDefaultCredentials()
Default credentials used to authenticate requests.- Returns:
- default credentials null if not defined
- See Also:
UserCredentials
-
getHosts
public Endpoint[] getHosts()
The list of endpoints that the client uses to connect.- Returns:
- hosts to connect to.
- See Also:
Endpoint
-
getKeepAliveTimeout
public long getKeepAliveTimeout()
The amount of time (in milliseconds) the sender of the keepalive ping waits for an acknowledgement. If it does not receive an acknowledgement within this time, it will close the channel.
-
getKeepAliveInterval
public long getKeepAliveInterval()
The amount of time (in milliseconds) to wait after which a keepalive ping is sent on the transport. Use -1 to disable.- Returns:
- keepalive value in milliseconds.
-
getDefaultDeadline
public java.lang.Long getDefaultDeadline()
An optional length of time (in milliseconds) to use for gRPC deadlines.- Returns:
- deadline value in milliseconds or null if not set.
-
builder
public static ConnectionSettingsBuilder builder()
Return a connection settings builder configured with default properties.- Returns:
- a builder.
- See Also:
ConnectionSettingsBuilder
-
-