Package com.eventstore.dbclient
Class ConnectionSettingsBuilder
java.lang.Object
com.eventstore.dbclient.ConnectionSettingsBuilder
Utility to create client settings programmatically.
-
Method Summary
Modifier and TypeMethodDescriptionAdds an endpoint the client will use to connect.addHost(InetSocketAddress host) Adds an endpoint the client will use to connect.addInterceptor(io.grpc.ClientInterceptor interceptor) Register a gRPC interceptor every time a new gRPC channel is created.Returns configured connection settings.defaultClientCertificate(ClientCertificate defaultClientCertificate) Client certificate used for user authentication.defaultClientCertificate(String clientCertFile, String clientKeyFile) Client certificate used for user authentication.defaultCredentials(UserCredentials defaultCredentials) Default credentials used to authenticate requests.defaultCredentials(String username, String password) Default credentials used to authenticate requests.defaultDeadline(long value) An optional length of time (in milliseconds) to use for gRPC deadlines.discoveryInterval(int discoveryInterval) How long to wait before retrying a new discovery process (in milliseconds).dnsDiscover(boolean dnsDiscover) If DNS node discovery is enabled.Add feature flag.Add feature flags.gossipTimeout(int gossipTimeout) How long to wait for the gossip request to timeout (in seconds).keepAliveInterval(long value) The amount of time (in milliseconds) to wait after which a keepalive ping is sent on the transport.keepAliveTimeout(long value) The amount of time (in milliseconds) the sender of the keepalive ping waits for an acknowledgement.maxDiscoverAttempts(int maxDiscoverAttempts) How many times to attempt connection before throwing.nodePreference(NodePreference nodePreference) Preferred node type when picking a node within a cluster.tls(boolean tls) If secure mode is enabled.Client certificate for secure connection.tlsVerifyCert(boolean tlsVerifyCert) If secure mode is enabled, is certificate verification enabled.
-
Method Details
-
buildConnectionSettings
Returns configured connection settings.- Returns:
- configured settings.
- See Also:
-
dnsDiscover
If DNS node discovery is enabled. -
maxDiscoverAttempts
How many times to attempt connection before throwing. -
discoveryInterval
How long to wait before retrying a new discovery process (in milliseconds). -
gossipTimeout
How long to wait for the gossip request to timeout (in seconds). -
nodePreference
Preferred node type when picking a node within a cluster. -
tls
If secure mode is enabled. -
tlsVerifyCert
If secure mode is enabled, is certificate verification enabled. -
defaultCredentials
Default credentials used to authenticate requests. -
defaultCredentials
Default credentials used to authenticate requests. -
defaultClientCertificate
public ConnectionSettingsBuilder defaultClientCertificate(String clientCertFile, String clientKeyFile) Client certificate used for user authentication. -
defaultClientCertificate
public ConnectionSettingsBuilder defaultClientCertificate(ClientCertificate defaultClientCertificate) Client certificate used for user authentication. -
addHost
Adds an endpoint the client will use to connect. -
addHost
Adds an endpoint the client will use to connect. -
keepAliveTimeout
The amount of time (in milliseconds) the sender of the keepalive ping waits for an acknowledgement. -
keepAliveInterval
The amount of time (in milliseconds) to wait after which a keepalive ping is sent on the transport. -
defaultDeadline
An optional length of time (in milliseconds) to use for gRPC deadlines. -
addInterceptor
Register a gRPC interceptor every time a new gRPC channel is created.- Parameters:
interceptor-
-
tlsCaFile
Client certificate for secure connection. Not required for enabling secure connection. Useful for self-signed certificate that are not installed on the system trust store.- Parameters:
filepath- path to a certificate file.
-
features
Add feature flags. -
feature
Add feature flag.
-