Class IoConfig.Builder
- Enclosing class:
- IoConfig
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionanalyticsCircuitBreakerConfig
(CircuitBreakerConfig.Builder analyticsCircuitBreakerConfig) Deprecated.analyticsCircuitBreakerConfig
(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the analytics circuit breaker by passing its config builder to the given consumer.backupCircuitBreakerConfig
(CircuitBreakerConfig.Builder backupCircuitBreakerConfig) Deprecated.Please usebackupCircuitBreakerConfig(Consumer)
instead.backupCircuitBreakerConfig
(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the backup circuit breaker by passing its config builder to the given consumer.build()
captureTraffic
(ServiceType... serviceTypes) Captures and logs network traffic for the specified services (or all services if none are specified).configIdleRedialTimeout
(Duration configIdleRedialTimeout) configPollInterval
(Duration configPollInterval) enableDnsSrv
(boolean dnsSrvEnabled) enableMutationTokens
(boolean mutationTokensEnabled) Configures whether mutation tokens will be returned from the server for all mutation operations.enableTcpKeepAlives
(boolean tcpKeepAlivesEnabled) eventingCircuitBreakerConfig
(CircuitBreakerConfig.Builder eventingCircuitBreakerConfig) Deprecated.Please useeventingCircuitBreakerConfig(Consumer)
instead.eventingCircuitBreakerConfig
(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the eventing circuit breaker by passing its config builder to the given consumer.idleHttpConnectionTimeout
(Duration idleHttpConnectionTimeout) kvCircuitBreakerConfig
(CircuitBreakerConfig.Builder kvCircuitBreakerConfig) Deprecated.Please usekvCircuitBreakerConfig(Consumer)
instead.kvCircuitBreakerConfig
(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the key-value circuit breaker by passing its config builder to the given consumer.managerCircuitBreakerConfig
(CircuitBreakerConfig.Builder managerCircuitBreakerConfig) Deprecated.Please usemanagerCircuitBreakerConfig(Consumer)
instead.managerCircuitBreakerConfig
(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the manager circuit breaker by passing its config builder to the given consumer.maxHttpConnections
(int maxHttpConnections) memcachedHashingStrategy
(MemcachedHashingStrategy memcachedHashingStrategy) Allows to customize the hashing strategy for memcached buckets.networkResolution
(NetworkResolution networkResolution) numKvConnections
(int numKvConnections) queryCircuitBreakerConfig
(CircuitBreakerConfig.Builder queryCircuitBreakerConfig) Deprecated.Please usequeryCircuitBreakerConfig(Consumer)
instead.queryCircuitBreakerConfig
(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the query circuit breaker by passing its config builder to the given consumer.searchCircuitBreakerConfig
(CircuitBreakerConfig.Builder searchCircuitBreakerConfig) Deprecated.Please usesearchCircuitBreakerConfig(Consumer)
instead.searchCircuitBreakerConfig
(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the search circuit breaker by passing its config builder to the given consumer.tcpKeepAliveTime
(Duration tcpKeepAliveTime) Allows to customize the idle time after which a tcp keepalive gets fired.timerConfig
(Consumer<TimerConfig.Builder> builderConsumer) Configures the timer by passing its config builder to the given consumer.viewCircuitBreakerConfig
(CircuitBreakerConfig.Builder viewCircuitBreakerConfig) Deprecated.Please useviewCircuitBreakerConfig(Consumer)
instead.viewCircuitBreakerConfig
(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the views circuit breaker by passing its config builder to the given consumer.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
-
configPollInterval
-
enableMutationTokens
Configures whether mutation tokens will be returned from the server for all mutation operations.- Returns:
- this, for chaining
-
enableDnsSrv
-
enableTcpKeepAlives
-
tcpKeepAliveTime
Allows to customize the idle time after which a tcp keepalive gets fired.Please note that this setting only propagates to the OS on linux when the epoll transport is used. On all other platforms, the OS-configured time is used (and you need to tune it there if you want to customize the default behavior).
- Parameters:
tcpKeepAliveTime
- the custom keepalive time.- Returns:
- this builder for chaining purposes.
-
kvCircuitBreakerConfig
Deprecated.Please usekvCircuitBreakerConfig(Consumer)
instead.Configures aCircuitBreaker
to use for key-value operations.- Returns:
- this, for chaining
-
kvCircuitBreakerConfig
public IoConfig.Builder kvCircuitBreakerConfig(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the key-value circuit breaker by passing its config builder to the given consumer.- Returns:
- this, for chaining
-
kvCircuitBreakerConfig
-
queryCircuitBreakerConfig
public IoConfig.Builder queryCircuitBreakerConfig(CircuitBreakerConfig.Builder queryCircuitBreakerConfig) Deprecated.Please usequeryCircuitBreakerConfig(Consumer)
instead.Configures aCircuitBreaker
to use for query operations.- Returns:
- this, for chaining
-
queryCircuitBreakerConfig
public IoConfig.Builder queryCircuitBreakerConfig(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the query circuit breaker by passing its config builder to the given consumer.- Returns:
- this, for chaining
-
queryCircuitBreakerConfig
-
viewCircuitBreakerConfig
public IoConfig.Builder viewCircuitBreakerConfig(CircuitBreakerConfig.Builder viewCircuitBreakerConfig) Deprecated.Please useviewCircuitBreakerConfig(Consumer)
instead.Configures aCircuitBreaker
to use for view operations.- Returns:
- this, for chaining
-
viewCircuitBreakerConfig
public IoConfig.Builder viewCircuitBreakerConfig(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the views circuit breaker by passing its config builder to the given consumer.- Returns:
- this, for chaining
-
viewCircuitBreakerConfig
-
searchCircuitBreakerConfig
public IoConfig.Builder searchCircuitBreakerConfig(CircuitBreakerConfig.Builder searchCircuitBreakerConfig) Deprecated.Please usesearchCircuitBreakerConfig(Consumer)
instead.Configures aCircuitBreaker
to use for search operations.- Returns:
- this, for chaining
-
searchCircuitBreakerConfig
public IoConfig.Builder searchCircuitBreakerConfig(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the search circuit breaker by passing its config builder to the given consumer.- Returns:
- this, for chaining
-
searchCircuitBreakerConfig
-
analyticsCircuitBreakerConfig
public IoConfig.Builder analyticsCircuitBreakerConfig(CircuitBreakerConfig.Builder analyticsCircuitBreakerConfig) Deprecated.Please useanalyticsCircuitBreakerConfig(Consumer)
instead.Configures aCircuitBreaker
to use for analytics operations.- Returns:
- this, for chaining
-
analyticsCircuitBreakerConfig
public IoConfig.Builder analyticsCircuitBreakerConfig(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the analytics circuit breaker by passing its config builder to the given consumer.- Returns:
- this, for chaining
-
analyticsCircuitBreakerConfig
-
managerCircuitBreakerConfig
public IoConfig.Builder managerCircuitBreakerConfig(CircuitBreakerConfig.Builder managerCircuitBreakerConfig) Deprecated.Please usemanagerCircuitBreakerConfig(Consumer)
instead.Configures aCircuitBreaker
to use for manager operations.- Returns:
- this, for chaining
-
managerCircuitBreakerConfig
public IoConfig.Builder managerCircuitBreakerConfig(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the manager circuit breaker by passing its config builder to the given consumer.- Returns:
- this, for chaining
-
managerCircuitBreakerConfig
-
eventingCircuitBreakerConfig
public IoConfig.Builder eventingCircuitBreakerConfig(CircuitBreakerConfig.Builder eventingCircuitBreakerConfig) Deprecated.Please useeventingCircuitBreakerConfig(Consumer)
instead.Configures aCircuitBreaker
to use for eventing operations.- Returns:
- this, for chaining
-
eventingCircuitBreakerConfig
public IoConfig.Builder eventingCircuitBreakerConfig(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the eventing circuit breaker by passing its config builder to the given consumer.- Returns:
- this, for chaining
-
eventingCircuitBreakerConfig
-
backupCircuitBreakerConfig
@Volatile public IoConfig.Builder backupCircuitBreakerConfig(CircuitBreakerConfig.Builder backupCircuitBreakerConfig) Deprecated.Please usebackupCircuitBreakerConfig(Consumer)
instead.Configures aCircuitBreaker
to use for backup operations.- Returns:
- this, for chaining
-
backupCircuitBreakerConfig
@Volatile public IoConfig.Builder backupCircuitBreakerConfig(Consumer<CircuitBreakerConfig.Builder> builderConsumer) Configures the backup circuit breaker by passing its config builder to the given consumer.- Returns:
- this, for chaining
-
backupCircuitBreakerConfig
-
captureTraffic
Captures and logs network traffic for the specified services (or all services if none are specified).IMPORTANT: Captured traffic is logged to the "com.couchbase.io" category at TRACE level. To see the log messages, make sure your logging library is configured appropriately. For example, if you're using Log4j2 with XML configuration, add this as a child of the
<Loggers>
element:<Logger name="com.couchbase.io" level="trace"/>
Traffic capture 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.
-
networkResolution
-
numKvConnections
-
maxHttpConnections
-
idleHttpConnectionTimeout
-
configIdleRedialTimeout
-
memcachedHashingStrategy
Allows to customize the hashing strategy for memcached buckets.Usually the
MemcachedHashingStrategy
should only be customized if i.e. the SDK is upgraded from Java SDK 2 and the documents in the bucket must be preserved. In this case, theSdk2CompatibleMemcachedHashingStrategy
must be chosen. If it is used though, keep in mind that it is not compatible with other SDKs, so we always recommend to use the defaultStandardMemcachedHashingStrategy
by default.- Parameters:
memcachedHashingStrategy
- the strategy to use.- Returns:
- this
IoConfig.Builder
for chaining purposes.
-
timerConfig
Configures the timer by passing its config builder to the given consumer.- Returns:
- this, for chaining
-
timerConfig
-
analyticsCircuitBreakerConfig(Consumer)
instead.