Class EventStoreDBClientSettings


  • public class EventStoreDBClientSettings
    extends java.lang.Object
    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 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.
      • getDefaultCredentials

        public UserCredentials getDefaultCredentials()
        Default credentials used to authenticate requests. User credentials take precedence over any configured ClientCertificate.
        Returns:
        default credentials null if not defined
        See Also:
        UserCredentials
      • getDefaultClientCertificate

        public ClientCertificate getDefaultClientCertificate()
        Default certificate for user authentication. If any UserCredentials are configured, the server will ignore the user certificate.
        Returns:
        user certificate, otherwise null.
        See Also:
        ClientCertificate
      • getHosts

        public java.net.InetSocketAddress[] 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

        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.
      • getInterceptors

        public java.util.List<io.grpc.ClientInterceptor> getInterceptors()
        Registered gRPC interceptors.
        Returns:
        list of registered gRPC client.
      • getTlsCaFile

        public java.lang.String getTlsCaFile()
        Client certificate for secure connection.
        Returns:
        tls CA file if it was provided, otherwise null.