Class ConnectionSettingsBuilder


  • public class ConnectionSettingsBuilder
    extends java.lang.Object
    Utility to create client settings programmatically.
    • Method Detail

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