Package com.eventstore.dbclient
Class ConnectionSettingsBuilder
- java.lang.Object
-
- com.eventstore.dbclient.ConnectionSettingsBuilder
-
public class ConnectionSettingsBuilder extends java.lang.ObjectUtility to create client settings programmatically.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionSettingsBuilderaddHost(Endpoint host)Adds an endpoint the client will use to connect.EventStoreDBClientSettingsbuildConnectionSettings()Returns configured connection settings.ConnectionSettingsBuilderdefaultCredentials(java.lang.String username, java.lang.String password)Default credentials used to authenticate requests.ConnectionSettingsBuilderdefaultDeadline(long value)An optional length of time (in milliseconds) to use for gRPC deadlines.ConnectionSettingsBuilderdiscoveryInterval(int discoveryInterval)How long to wait before retrying a new discovery process (in milliseconds).ConnectionSettingsBuilderdnsDiscover(boolean dnsDiscover)If DNS node discovery is enabled.ConnectionSettingsBuildergossipTimeout(int gossipTimeout)How long to wait for the gossip request to timeout (in seconds).ConnectionSettingsBuilderkeepAliveInterval(long value)The amount of time (in milliseconds) to wait after which a keepalive ping is sent on the transport.ConnectionSettingsBuilderkeepAliveTimeout(long value)The amount of time (in milliseconds) the sender of the keepalive ping waits for an acknowledgement.ConnectionSettingsBuildermaxDiscoverAttempts(int maxDiscoverAttempts)How many times to attempt connection before throwing.ConnectionSettingsBuildernodePreference(NodePreference nodePreference)Preferred node type when picking a node within a cluster.ConnectionSettingsBuilderthrowOnAppendFailure(boolean throwOnAppendFailure)If an exception is thrown whether an append operation fails.ConnectionSettingsBuildertls(boolean tls)If secure mode is enabled.ConnectionSettingsBuildertlsVerifyCert(boolean tlsVerifyCert)If secure mode is enabled, is certificate verification enabled.
-
-
-
Method Detail
-
buildConnectionSettings
public EventStoreDBClientSettings buildConnectionSettings()
Returns configured connection settings.- Returns:
- configured settings.
- See Also:
EventStoreDBClientSettings
-
dnsDiscover
public ConnectionSettingsBuilder dnsDiscover(boolean dnsDiscover)
If DNS node discovery is enabled.
-
maxDiscoverAttempts
public ConnectionSettingsBuilder maxDiscoverAttempts(int maxDiscoverAttempts)
How many times to attempt connection before throwing.
-
discoveryInterval
public ConnectionSettingsBuilder discoveryInterval(int discoveryInterval)
How long to wait before retrying a new discovery process (in milliseconds).
-
gossipTimeout
public ConnectionSettingsBuilder gossipTimeout(int gossipTimeout)
How long to wait for the gossip request to timeout (in seconds).
-
nodePreference
public ConnectionSettingsBuilder nodePreference(NodePreference nodePreference)
Preferred node type when picking a node within a cluster.
-
tls
public ConnectionSettingsBuilder tls(boolean tls)
If secure mode is enabled.
-
tlsVerifyCert
public ConnectionSettingsBuilder tlsVerifyCert(boolean tlsVerifyCert)
If secure mode is enabled, is certificate verification enabled.
-
throwOnAppendFailure
public ConnectionSettingsBuilder throwOnAppendFailure(boolean throwOnAppendFailure)
If an exception is thrown whether an append operation fails.
-
defaultCredentials
public ConnectionSettingsBuilder defaultCredentials(java.lang.String username, java.lang.String password)
Default credentials used to authenticate requests.
-
addHost
public ConnectionSettingsBuilder addHost(Endpoint host)
Adds an endpoint the client will use to connect.- See Also:
Endpoint
-
keepAliveTimeout
public ConnectionSettingsBuilder keepAliveTimeout(long value)
The amount of time (in milliseconds) the sender of the keepalive ping waits for an acknowledgement.
-
keepAliveInterval
public ConnectionSettingsBuilder keepAliveInterval(long value)
The amount of time (in milliseconds) to wait after which a keepalive ping is sent on the transport.
-
defaultDeadline
public ConnectionSettingsBuilder defaultDeadline(long value)
An optional length of time (in milliseconds) to use for gRPC deadlines.
-
-