Class IoConfig


  • public class IoConfig
    extends Object
    • Field Detail

      • DEFAULT_MUTATION_TOKENS_ENABLED

        public static final boolean DEFAULT_MUTATION_TOKENS_ENABLED
        See Also:
        Constant Field Values
      • DEFAULT_DNS_SRV_ENABLED

        public static final boolean DEFAULT_DNS_SRV_ENABLED
        See Also:
        Constant Field Values
      • DEFAULT_TCP_KEEPALIVE_ENABLED

        public static final boolean DEFAULT_TCP_KEEPALIVE_ENABLED
        See Also:
        Constant Field Values
      • DEFAULT_TCP_KEEPALIVE_TIME

        public static final Duration DEFAULT_TCP_KEEPALIVE_TIME
      • DEFAULT_CONFIG_POLL_INTERVAL

        public static final Duration DEFAULT_CONFIG_POLL_INTERVAL
      • DEFAULT_NETWORK_RESOLUTION

        public static final NetworkResolution DEFAULT_NETWORK_RESOLUTION
      • DEFAULT_NUM_KV_CONNECTIONS

        public static final int DEFAULT_NUM_KV_CONNECTIONS
        See Also:
        Constant Field Values
      • DEFAULT_MAX_HTTP_CONNECTIONS

        public static final int DEFAULT_MAX_HTTP_CONNECTIONS
        See Also:
        Constant Field Values
      • DEFAULT_IDLE_HTTP_CONNECTION_TIMEOUT

        public static final Duration DEFAULT_IDLE_HTTP_CONNECTION_TIMEOUT
      • DEFAULT_CONFIG_IDLE_REDIAL_TIMEOUT

        public static final Duration DEFAULT_CONFIG_IDLE_REDIAL_TIMEOUT
    • Method Detail

      • create

        public static IoConfig create()
      • enableMutationTokens

        public static IoConfig.Builder enableMutationTokens​(boolean mutationTokensEnabled)
      • enableDnsSrv

        public static IoConfig.Builder enableDnsSrv​(boolean dnsSrvEnabled)
      • captureTraffic

        public static IoConfig.Builder captureTraffic​(ServiceType... serviceTypes)
        Captures the traffic for all services provided as an argument (all if empty).

        IMPORTANT: It is not enough to just enable traffic capturing, also TRACE level logging needs to be enabled for the couchbase namespace in your logger implementation.

        Note that this flag should only be enabled during development and for debugging purposes. When enabled it will add more overhead due to traffic parsing, logging and analysis.

        Returns:
        this IoConfig.Builder for chaining purposes.
      • enableTcpKeepAlives

        public static IoConfig.Builder enableTcpKeepAlives​(boolean tcpKeepAliveEnabled)
      • numKvConnections

        public static IoConfig.Builder numKvConnections​(int numKvConnections)
      • maxHttpConnections

        public static IoConfig.Builder maxHttpConnections​(int maxHttpConnections)
      • idleHttpConnectionTimeout

        public static IoConfig.Builder idleHttpConnectionTimeout​(Duration idleHttpConnectionTimeout)
      • configIdleRedialTimeout

        public static IoConfig.Builder configIdleRedialTimeout​(Duration configIdleRedialTimeout)
      • mutationTokensEnabled

        public boolean mutationTokensEnabled()
      • dnsSrvEnabled

        public boolean dnsSrvEnabled()
      • configPollInterval

        public Duration configPollInterval()
      • servicesToCapture

        public Set<ServiceType> servicesToCapture()
        Lists the services on which traffic should be captured.
        Returns:
        the services to capture traffic from, if present.
      • tcpKeepAlivesEnabled

        public boolean tcpKeepAlivesEnabled()
      • tcpKeepAliveTime

        public Duration tcpKeepAliveTime()
      • numKvConnections

        public int numKvConnections()
      • maxHttpConnections

        public int maxHttpConnections()
      • idleHttpConnectionTimeout

        public Duration idleHttpConnectionTimeout()
      • configIdleRedialTimeout

        public Duration configIdleRedialTimeout()