Package com.eventstore.dbclient
Class EventStoreDBClientSettings
java.lang.Object
com.eventstore.dbclient.EventStoreDBClientSettings
Gathers 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
- keepAliveTimeout: 10000
- keepAliveInterval: 10000
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectionSettingsBuilderbuilder()Return a connection settings builder configured with default properties.Default certificate for user authentication.Default credentials used to authenticate requests.An optional length of time (in milliseconds) to use for gRPC deadlines.intHow long to wait before retrying a new discovery process (in milliseconds).Feature flagsintHow long to wait for the gossip request to time out (in seconds).getHosts()The list of endpoints that the client uses to connect.List<io.grpc.ClientInterceptor>Registered gRPC interceptors.longThe amount of time (in milliseconds) to wait after which a keepalive ping is sent on the transport.longThe amount of time (in milliseconds) the sender of the keepalive ping waits for an acknowledgement.intHow many times to attempt connection before throwing.Preferred node type when picking a node within a cluster.Client certificate for secure connection.booleanIf the dns discovery is enabled.booleanisTls()If secure mode is enabled.booleanIf secure mode is enabled, is certificate verification enabled.
-
Method Details
-
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
Preferred node type when picking a node within a cluster.- Returns:
- selected node preference.
- See Also:
-
isTls
public boolean isTls()If secure mode is enabled. -
isTlsVerifyCert
public boolean isTlsVerifyCert()If secure mode is enabled, is certificate verification enabled. -
getDefaultCredentials
Default credentials used to authenticate requests. User credentials take precedence over any configuredClientCertificate.- Returns:
- default credentials null if not defined
- See Also:
-
getDefaultClientCertificate
Default certificate for user authentication. If anyUserCredentialsare configured, the server will ignore the user certificate.- Returns:
- user certificate, otherwise null.
- See Also:
-
getHosts
The list of endpoints that the client uses to connect.- Returns:
- hosts to connect to.
-
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
An optional length of time (in milliseconds) to use for gRPC deadlines.- Returns:
- deadline value in milliseconds or null if not set.
-
getInterceptors
Registered gRPC interceptors.- Returns:
- list of registered gRPC client.
-
getTlsCaFile
Client certificate for secure connection.- Returns:
- tls CA file if it was provided, otherwise null.
-
getFeatures
Feature flags -
builder
Return a connection settings builder configured with default properties.- Returns:
- a builder.
- See Also:
-