public static class DefaultCoreEnvironment.Builder<SELF extends DefaultCoreEnvironment.Builder<SELF>> extends Object
Modifier | Constructor and Description |
---|---|
protected |
Builder() |
Modifier and Type | Method and Description |
---|---|
SELF |
analyticsIoPool(EventLoopGroup group,
ShutdownHook shutdownHook)
Sets the Analytics I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down.
|
SELF |
analyticsServiceConfig(AnalyticsServiceConfig analyticsServiceConfig)
Allows to set a custom configuration for the Analytics service.
|
SELF |
autoreleaseAfter(long autoreleaseAfter)
Sets the time after which any non-consumed buffers will be automatically released.
|
SELF |
bootstrapCarrierDirectPort(int bootstrapCarrierDirectPort)
If carrier publication bootstrap is enabled and not SSL, sets the port to use (default value ).
|
SELF |
bootstrapCarrierEnabled(boolean bootstrapCarrierEnabled)
Toggles bootstrap via carrier publication (default value ).
|
SELF |
bootstrapCarrierSslPort(int bootstrapCarrierSslPort)
If carrier publication bootstrap and SSL are enabled, sets the port to use (default value ).
|
SELF |
bootstrapHttpDirectPort(int bootstrapHttpDirectPort)
If Http bootstrap is enabled and not SSL, sets the port to use (default value ).
|
SELF |
bootstrapHttpEnabled(boolean bootstrapHttpEnabled)
Toggles bootstrap via Http (default value ).
|
SELF |
bootstrapHttpSslPort(int bootstrapHttpSslPort)
If Http bootstrap and SSL are enabled, sets the port to use (default value ).
|
SELF |
bufferPoolingEnabled(boolean bufferPoolingEnabled)
Forcefully disable buffer pooling by setting the value to false.
|
DefaultCoreEnvironment |
build() |
SELF |
callbacksOnIoPool(boolean callbacksOnIoPool)
Set to true if the
Observable callbacks should be completed on the IO event loops. |
SELF |
certAuthEnabled(boolean certAuthEnabled)
Allows to enable X.509 client certificate authentication.
|
SELF |
compressionMinRatio(double compressionMinRatio)
Allows to adjust the ratio over which the document is sent compressed over the wire - in percent.
|
SELF |
compressionMinSize(int compressionMinSize)
Allows to adjust the minimum size of a document to be considered for compression - in bytes.
|
SELF |
computationPoolSize(int computationPoolSize)
Sets the pool size (number of threads to use) for all non blocking operations in the core and clients (default value is the number of CPUs).
|
SELF |
configPollFloorInterval(long configPollFloorInterval)
Allows to set the minimum config polling interval.
|
SELF |
configPollInterval(long configPollInterval)
Allows to set the configuration poll interval which polls the server cluster configuration proactively.
|
SELF |
continuousKeepAliveEnabled(boolean continuousKeepAliveEnabled)
Allows to enable or disable the continous emitting of keepalive messages.
|
SELF |
couchbaseCoreSendHook(CouchbaseCoreSendHook hook)
Allows to configure a custom core send hook, see the javadocs for it for more details.
|
SELF |
defaultMetricsLoggingConsumer(boolean enabled,
CouchbaseLogLevel level) |
SELF |
defaultMetricsLoggingConsumer(boolean enabled,
CouchbaseLogLevel level,
LoggingConsumer.OutputFormat format) |
SELF |
disconnectTimeout(long disconnectTimeout)
Sets a custom disconnect timeout.
|
SELF |
eventBus(EventBus eventBus)
Sets the event bus to an alternative implementation.
|
SELF |
forceSaslPlain(boolean forceSaslPlain)
Allows to forcre the KeyValue SASL authentication method to PLAIN which is used to allow authentication against LDAP-based users.
|
SELF |
ioPool(EventLoopGroup group)
Deprecated.
use
ioPool(EventLoopGroup, ShutdownHook) to also provide a shutdown hook. |
SELF |
ioPool(EventLoopGroup group,
ShutdownHook shutdownHook)
Sets the I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down.
|
SELF |
ioPoolSize(int ioPoolSize)
Sets the pool size (number of threads to use) for I/O operations (default value is the number of CPUs).
|
SELF |
keepAliveErrorThreshold(long keepAliveErrorThreshold)
Allows to customize the errors on keepalive messages threshold after which the connection will be recycled.
|
SELF |
keepAliveInterval(long keepAliveIntervalMilliseconds)
Sets the time of inactivity, in milliseconds, after which some services will issue a form of keep-alive request to their corresponding server/nodes (default is 30s, values <= 0 deactivate the idle check).
|
SELF |
keepAliveTimeout(long keepAliveTimeout)
Allows to customize the timeout used for keepalive operations.
|
SELF |
keyValueServiceConfig(KeyValueServiceConfig keyValueServiceConfig)
Allows to set a custom configuration for the KV service.
|
SELF |
kvEndpoints(int kvEndpoints)
Deprecated.
Please use
keyValueServiceConfig(KeyValueServiceConfig) going forward. |
SELF |
kvIoPool(EventLoopGroup group,
ShutdownHook shutdownHook)
Sets the KV I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down.
|
SELF |
maxRequestLifetime(long maxRequestLifetime)
Sets the maximum time in milliseconds a request is allowed to live.
|
SELF |
memcachedHashingStrategy(MemcachedHashingStrategy memcachedHashingStrategy)
Sets a custom memcached node hashing strategy, mainly used for compatibility with other clients.
|
SELF |
mutationTokensEnabled(boolean mutationTokensEnabled)
If mutation tokens are enabled, they can be used for advanced durability requirements, as well as optimized RYOW consistency.
|
SELF |
networkLatencyMetricsCollectorConfig(LatencyMetricsCollectorConfig metricsCollectorConfig)
Sets a custom configuration for the
NetworkLatencyMetricsCollector . |
SELF |
networkResolution(NetworkResolution networkResolution)
Allows to tune the network resolution setting, pinning it to either internal or external instead of relying on the automatic mechanism.
|
SELF |
observeIntervalDelay(Delay observeIntervalDelay)
|
SELF |
operationTracingEnabled(boolean operationTracingEnabled)
Allows to enable/disable the tracing support.
|
SELF |
operationTracingServerDurationEnabled(boolean operationTracingServerDurationEnabled)
Allows to enable/disable the negotiation of server duration-enabled tracing.
|
SELF |
orphanResponseReporter(OrphanResponseReporter orphanResponseReporter) |
SELF |
orphanResponseReportingEnabled(boolean orphanResponseReportingEnabled) |
SELF |
packageNameAndVersion(String packageNameAndVersion)
Sets the String to be used as identifier for the library namespace and version.
|
SELF |
queryEndpoints(int queryEndpoints)
Deprecated.
Please use
queryServiceConfig(QueryServiceConfig) going forward. |
SELF |
queryIoPool(EventLoopGroup group,
ShutdownHook shutdownHook)
Sets the Query I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down.
|
SELF |
queryServiceConfig(QueryServiceConfig queryServiceConfig)
Allows to set a custom configuration for the Query service.
|
SELF |
reconnectDelay(Delay reconnectDelay)
Sets the
Delay for node reconnects (default value is a delay growing exponentially between 32ms and 4096ms). |
SELF |
requestBufferSize(int requestBufferSize)
Sets the size of the RingBuffer structure that queues requests (default value ).
|
SELF |
requestBufferWaitStrategy(WaitStrategyFactory waitStrategy)
Sets a custom waiting strategy for requests.
|
SELF |
responseBufferSize(int responseBufferSize)
Sets the size of the RingBuffer structure that queues responses (default value ).
|
SELF |
retryDelay(Delay retryDelay)
Sets the
Delay for retries of requests (default value is a delay growing exponentially between 100us and 100ms). |
SELF |
retryStrategy(RetryStrategy retryStrategy)
Sets the
RetryStrategy to be used during request retries (default value is a BestEffortRetryStrategy ). |
SELF |
runtimeMetricsCollectorConfig(MetricsCollectorConfig metricsCollectorConfig)
Sets a custom configuration for the
RuntimeMetricsCollector . |
SELF |
scheduler(rx.Scheduler scheduler)
Deprecated.
use
ioPool(EventLoopGroup, ShutdownHook) to also provide a shutdown hook. |
SELF |
scheduler(rx.Scheduler scheduler,
ShutdownHook shutdownHook)
Sets the Scheduler implementation for the underlying computation framework, along with the action to execute when this environment is shut down.
|
SELF |
searchEndpoints(int searchEndpoints)
Deprecated.
Please use
searchServiceConfig(SearchServiceConfig) going forward. |
SELF |
searchIoPool(EventLoopGroup group,
ShutdownHook shutdownHook)
Sets the Search I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down.
|
SELF |
searchServiceConfig(SearchServiceConfig searchServiceConfig)
Allows to set a custom configuration for the Search service.
|
protected SELF |
self() |
SELF |
socketConnectTimeout(int socketConnectTimeout)
Sets a custom socket connect timeout.
|
SELF |
sslEnabled(boolean sslEnabled)
Set if SSL should be enabled (default value ).
|
SELF |
sslKeystore(KeyStore sslKeystore)
Sets the SSL Keystore directly and not indirectly via filepath.
|
SELF |
sslKeystoreFile(String sslKeystoreFile)
Defines the location of the SSL Keystore file (default value null, none).
|
SELF |
sslKeystorePassword(String sslKeystorePassword)
Sets the SSL Keystore password to be used with the Keystore file (default value null, none).
|
SELF |
sslTruststore(KeyStore sslTruststore)
Sets the SSL Keystore for the TrustStore directly and not indirectly via filepath.
|
SELF |
sslTruststoreFile(String sslTruststoreFile)
Defines the location of the SSL TrustStore keystore file (default value null, none).
|
SELF |
sslTruststorePassword(String sslTruststorePassword)
Sets the SSL TrustStore password to be used with the Keystore file (default value null, none).
|
SELF |
tcpNodelayEnabled(boolean tcpNodelayEnabled)
If TCP_NODELAY is manually disabled, Nagle’ing will take effect on both the client and (if supported) the server side.
|
SELF |
tracer(io.opentracing.Tracer tracer)
Allows to specify a custom tracer.
|
SELF |
userAgent(String userAgent)
Sets the USER-AGENT String to be sent in HTTP requests headers (should usually not be tweaked, default value is computed from the SDK
DefaultCoreEnvironment.packageNameAndVersion() ). |
SELF |
viewEndpoints(int viewEndpoints)
Deprecated.
Please use
viewServiceConfig(ViewServiceConfig) going forward. |
SELF |
viewIoPool(EventLoopGroup group,
ShutdownHook shutdownHook)
Sets the View I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down.
|
SELF |
viewServiceConfig(ViewServiceConfig viewServiceConfig)
Allows to set a custom configuration for the View service.
|
protected SELF self()
public SELF sslEnabled(boolean sslEnabled)
Set if SSL should be enabled (default value ). If true, also set sslKeystoreFile(String)
and sslKeystorePassword(String)
.
public SELF sslKeystoreFile(String sslKeystoreFile)
Defines the location of the SSL Keystore file (default value null, none).
If this method is used without also specifying sslTruststoreFile(String)
this keystore will be used to initialize both the key factory as well as the trust factory with java SSL. This needs to be the case for backwards compatibility, but if you do not need X.509 client cert authentication you might as well just use sslTruststoreFile(String)
alone.
public SELF sslTruststoreFile(String sslTruststoreFile)
Defines the location of the SSL TrustStore keystore file (default value null, none).
If this method is used without also specifying sslKeystoreFile(String)
this keystore will be used to initialize both the key factory as well as the trust factory with java SSL. Prefer this method over the sslKeystoreFile(String)
if you do not need X.509 client auth and just need server side certificate checking.
public SELF sslKeystorePassword(String sslKeystorePassword)
Sets the SSL Keystore password to be used with the Keystore file (default value null, none).
sslKeystoreFile(String)
public SELF sslTruststorePassword(String sslTruststorePassword)
Sets the SSL TrustStore password to be used with the Keystore file (default value null, none).
sslKeystoreFile(String)
public SELF sslKeystore(KeyStore sslKeystore)
Sets the SSL Keystore directly and not indirectly via filepath.
If this method is used without also specifying sslTruststore(KeyStore)
this keystore will be used to initialize both the key factory as well as the trust factory with java SSL. This needs to be the case for backwards compatibility, but if you do not need X.509 client cert authentication you might as well just use sslTruststore(KeyStore)
alone.
sslKeystore
- the keystore to use.public SELF sslTruststore(KeyStore sslTruststore)
Sets the SSL Keystore for the TrustStore directly and not indirectly via filepath.
If this method is used without also specifying sslKeystore(KeyStore)
this keystore will be used to initialize both the key factory as well as the trust factory with java SSL. Prefer this method over the sslKeystore(KeyStore)
if you do not need X.509 client auth and just need server side certificate checking.
sslTruststore
- the keystore to use.public SELF bootstrapHttpEnabled(boolean bootstrapHttpEnabled)
Toggles bootstrap via Http (default value ).
public SELF bootstrapCarrierEnabled(boolean bootstrapCarrierEnabled)
Toggles bootstrap via carrier publication (default value ).
public SELF bootstrapHttpDirectPort(int bootstrapHttpDirectPort)
If Http bootstrap is enabled and not SSL, sets the port to use (default value ).
public SELF bootstrapHttpSslPort(int bootstrapHttpSslPort)
If Http bootstrap and SSL are enabled, sets the port to use (default value ).
public SELF bootstrapCarrierDirectPort(int bootstrapCarrierDirectPort)
If carrier publication bootstrap is enabled and not SSL, sets the port to use (default value ).
public SELF bootstrapCarrierSslPort(int bootstrapCarrierSslPort)
If carrier publication bootstrap and SSL are enabled, sets the port to use (default value ).
public SELF ioPoolSize(int ioPoolSize)
Sets the pool size (number of threads to use) for I/O operations (default value is the number of CPUs).
If there is more nodes in the cluster than the defined ioPoolSize, multiplexing will automatically happen.
public SELF computationPoolSize(int computationPoolSize)
Sets the pool size (number of threads to use) for all non blocking operations in the core and clients (default value is the number of CPUs).
Don’t size it too small since it would significantly impact performance.
public SELF requestBufferSize(int requestBufferSize)
Sets the size of the RingBuffer structure that queues requests (default value ). This is an advanced parameter that usually shouldn’t need to be changed.
public SELF responseBufferSize(int responseBufferSize)
Sets the size of the RingBuffer structure that queues responses (default value ). This is an advanced parameter that usually shouldn’t need to be changed
public SELF kvEndpoints(int kvEndpoints)
keyValueServiceConfig(KeyValueServiceConfig)
going forward.Sets the number of Key/Value endpoints to open per nodes in the cluster (default value ).
Only tune to more if IO has been identified as the most probable bottleneck, since it can reduce batching on the tcp/network level.
public SELF viewEndpoints(int viewEndpoints)
viewServiceConfig(ViewServiceConfig)
going forward.Sets the number of View endpoints to open per node in the cluster (default value ).
Setting this to a higher number is advised in heavy view workloads.
public SELF queryEndpoints(int queryEndpoints)
queryServiceConfig(QueryServiceConfig)
going forward.Sets the number of Query (N1QL) endpoints to open per node in the cluster (default value ).
Setting this to a higher number is advised in heavy query workloads.
public SELF searchEndpoints(int searchEndpoints)
searchServiceConfig(SearchServiceConfig)
going forward.Sets the number of Search (CBFT) endpoints to open per node in the cluster (default value ).
Setting this to a higher number is advised in heavy query workloads.
public SELF userAgent(String userAgent)
Sets the USER-AGENT String to be sent in HTTP requests headers (should usually not be tweaked, default value is computed from the SDK DefaultCoreEnvironment.packageNameAndVersion()
).
public SELF packageNameAndVersion(String packageNameAndVersion)
Sets the String to be used as identifier for the library namespace and version. (should usually not be tweaked, default value is computed at build time from VCS tags/commits).
This is used in DefaultCoreEnvironment.userAgent()
notably.
public SELF reconnectDelay(Delay reconnectDelay)
Sets the Delay
for node reconnects (default value is a delay growing exponentially between 32ms and 4096ms).
public SELF retryDelay(Delay retryDelay)
Sets the Delay
for retries of requests (default value is a delay growing exponentially between 100us and 100ms).
@Deprecated public SELF ioPool(EventLoopGroup group)
ioPool(EventLoopGroup, ShutdownHook)
to also provide a shutdown hook.Sets the I/O Pool implementation for the underlying IO framework. This is an advanced configuration that should only be used if you know what you are doing.
public SELF ioPool(EventLoopGroup group, ShutdownHook shutdownHook)
Sets the I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down. This is an advanced configuration that should only be used if you know what you are doing.
public SELF kvIoPool(EventLoopGroup group, ShutdownHook shutdownHook)
Sets the KV I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down. This is an advanced configuration that should only be used if you know what you are doing.
public SELF viewIoPool(EventLoopGroup group, ShutdownHook shutdownHook)
Sets the View I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down. This is an advanced configuration that should only be used if you know what you are doing.
public SELF queryIoPool(EventLoopGroup group, ShutdownHook shutdownHook)
Sets the Query I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down. This is an advanced configuration that should only be used if you know what you are doing.
public SELF searchIoPool(EventLoopGroup group, ShutdownHook shutdownHook)
Sets the Search I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down. This is an advanced configuration that should only be used if you know what you are doing.
public SELF analyticsIoPool(EventLoopGroup group, ShutdownHook shutdownHook)
Sets the Analytics I/O Pool implementation for the underlying IO framework, along with the action to execute when this environment is shut down. This is an advanced configuration that should only be used if you know what you are doing.
@Deprecated public SELF scheduler(rx.Scheduler scheduler)
ioPool(EventLoopGroup, ShutdownHook)
to also provide a shutdown hook.Sets the Scheduler implementation for the underlying computation framework. This is an advanced configuration that should only be used if you know what you are doing.
public SELF scheduler(rx.Scheduler scheduler, ShutdownHook shutdownHook)
Sets the Scheduler implementation for the underlying computation framework, along with the action to execute when this environment is shut down. This is an advanced configuration that should only be used if you know what you are doing.
public SELF retryStrategy(RetryStrategy retryStrategy)
Sets the RetryStrategy
to be used during request retries (default value is a BestEffortRetryStrategy
).
public SELF maxRequestLifetime(long maxRequestLifetime)
Sets the maximum time in milliseconds a request is allowed to live.
If the best effort retry strategy is used, the request will still be cancelled after this period to make sure that requests are not sticking around forever. Make sure it is longer than any timeout you potentially have configured.
Default is 75s.
public SELF keepAliveInterval(long keepAliveIntervalMilliseconds)
Sets the time of inactivity, in milliseconds, after which some services will issue a form of keep-alive request to their corresponding server/nodes (default is 30s, values <= 0 deactivate the idle check).
public SELF autoreleaseAfter(long autoreleaseAfter)
Sets the time after which any non-consumed buffers will be automatically released. Setting this to a higher value than a few seconds is not recommended since this may lead to increased garbage collection.
public SELF eventBus(EventBus eventBus)
Sets the event bus to an alternative implementation.
This setting should only be tweaked in advanced cases.
public SELF bufferPoolingEnabled(boolean bufferPoolingEnabled)
Forcefully disable buffer pooling by setting the value to false.
This should not be used in general because buffer pooling is in place to reduce GC pressure during workloads. It is implemented to be used as a “last resort” if the client is suspect to a buffer leak which can terminate the application. Until a solution is found to the leak buffer pooling can be disabled at the cost of higher GC.
public SELF tcpNodelayEnabled(boolean tcpNodelayEnabled)
If TCP_NODELAY is manually disabled, Nagle’ing will take effect on both the client and (if supported) the server side.
public SELF mutationTokensEnabled(boolean mutationTokensEnabled)
If mutation tokens are enabled, they can be used for advanced durability requirements, as well as optimized RYOW consistency.
Note that just enabling it here won’t help if the server does not support it as well. Use at least Couchbase Server 4.0. Also, consider the additional overhead of 16 bytes per mutation response (8 byte for the vbucket uuid and 8 byte for the sequence number).
public SELF runtimeMetricsCollectorConfig(MetricsCollectorConfig metricsCollectorConfig)
Sets a custom configuration for the RuntimeMetricsCollector
.
metricsCollectorConfig
- the custom configurationpublic SELF networkLatencyMetricsCollectorConfig(LatencyMetricsCollectorConfig metricsCollectorConfig)
Sets a custom configuration for the NetworkLatencyMetricsCollector
.
metricsCollectorConfig
- the custom configuration for the collector.public SELF defaultMetricsLoggingConsumer(boolean enabled, CouchbaseLogLevel level, LoggingConsumer.OutputFormat format)
public SELF defaultMetricsLoggingConsumer(boolean enabled, CouchbaseLogLevel level)
public SELF socketConnectTimeout(int socketConnectTimeout)
Sets a custom socket connect timeout.
socketConnectTimeout
- the socket connect timeout in milliseconds.public SELF callbacksOnIoPool(boolean callbacksOnIoPool)
Set to true if the Observable
callbacks should be completed on the IO event loops.
Note: this is an advanced option and must be used with care. It can be used to improve performance since it removes additional scheduling overhead on the response path, but any blocking calls in the callbacks will lead to more work on the event loops itself and eventually stall them.
USE WITH CARE!
public SELF disconnectTimeout(long disconnectTimeout)
Sets a custom disconnect timeout.
disconnectTimeout
- the disconnect timeout in milliseconds.@InterfaceStability.Experimental @InterfaceAudience.Public public SELF requestBufferWaitStrategy(WaitStrategyFactory waitStrategy)
Sets a custom waiting strategy for requests. Default is BlockingWaitStrategy
.
waitStrategy
- waiting strategypublic SELF memcachedHashingStrategy(MemcachedHashingStrategy memcachedHashingStrategy)
Sets a custom memcached node hashing strategy, mainly used for compatibility with other clients.
memcachedHashingStrategy
- the strategy to use.public SELF keyValueServiceConfig(KeyValueServiceConfig keyValueServiceConfig)
Allows to set a custom configuration for the KV service.
keyValueServiceConfig
- the config to apply.public SELF viewServiceConfig(ViewServiceConfig viewServiceConfig)
Allows to set a custom configuration for the View service.
viewServiceConfig
- the config to apply.public SELF queryServiceConfig(QueryServiceConfig queryServiceConfig)
Allows to set a custom configuration for the Query service.
queryServiceConfig
- the config to apply.public SELF searchServiceConfig(SearchServiceConfig searchServiceConfig)
Allows to set a custom configuration for the Search service.
searchServiceConfig
- the config to apply.public SELF analyticsServiceConfig(AnalyticsServiceConfig analyticsServiceConfig)
Allows to set a custom configuration for the Analytics service.
analyticsServiceConfig
- the config to apply.@InterfaceStability.Committed @InterfaceAudience.Public public SELF configPollInterval(long configPollInterval)
Allows to set the configuration poll interval which polls the server cluster configuration proactively.
Note that the interval cannot be set lower than the floor interval defined in configPollFloorInterval(long)
.
configPollInterval
- the interval in milliseconds, 0 deactivates the polling.@InterfaceStability.Committed @InterfaceAudience.Public public SELF configPollFloorInterval(long configPollFloorInterval)
Allows to set the minimum config polling interval.
Note that the configPollInterval(long)
obviously needs to be equal or larger than this setting, otherwise intervals will be skipped.
configPollFloorInterval
- the interval in milliseconds.@InterfaceStability.Uncommitted @InterfaceAudience.Public public SELF certAuthEnabled(boolean certAuthEnabled)
Allows to enable X.509 client certificate authentication. Needs to be used in combination with sslEnabled(boolean)
and related methods of course.
@InterfaceAudience.Public @InterfaceStability.Uncommitted public SELF continuousKeepAliveEnabled(boolean continuousKeepAliveEnabled)
Allows to enable or disable the continous emitting of keepalive messages.
@InterfaceAudience.Public @InterfaceStability.Uncommitted public SELF keepAliveErrorThreshold(long keepAliveErrorThreshold)
Allows to customize the errors on keepalive messages threshold after which the connection will be recycled.
@InterfaceAudience.Public @InterfaceStability.Uncommitted public SELF keepAliveTimeout(long keepAliveTimeout)
Allows to customize the timeout used for keepalive operations.
@InterfaceAudience.Public @InterfaceStability.Experimental public SELF couchbaseCoreSendHook(CouchbaseCoreSendHook hook)
Allows to configure a custom core send hook, see the javadocs for it for more details.
@InterfaceAudience.Public @InterfaceStability.Committed public SELF forceSaslPlain(boolean forceSaslPlain)
Allows to forcre the KeyValue SASL authentication method to PLAIN which is used to allow authentication against LDAP-based users.
forceSaslPlain
- true if plain should be forced, false otherwise.@InterfaceStability.Committed public SELF operationTracingEnabled(boolean operationTracingEnabled)
Allows to enable/disable the tracing support.
Note that it is enabled by default, but only activated once opentracing is on the classpath!
operationTracingEnabled
- enable or disable the tracing.@InterfaceStability.Committed public SELF operationTracingServerDurationEnabled(boolean operationTracingServerDurationEnabled)
Allows to enable/disable the negotiation of server duration-enabled tracing.
Note that this is enabled by default, but depending on the server version may or may not be available (it is negotiated at runtime)!
operationTracingServerDurationEnabled
- enable or disable the server duration.@InterfaceStability.Committed public SELF tracer(io.opentracing.Tracer tracer)
Allows to specify a custom tracer.
tracer
- the tracer to use.@InterfaceAudience.Public @InterfaceStability.Uncommitted public SELF compressionMinSize(int compressionMinSize)
Allows to adjust the minimum size of a document to be considered for compression - in bytes.
compressionMinSize
- min compression size in bytes.@InterfaceAudience.Public @InterfaceStability.Uncommitted public SELF compressionMinRatio(double compressionMinRatio)
Allows to adjust the ratio over which the document is sent compressed over the wire - in percent.
compressionMinRatio
- the compression ratio in percent.@InterfaceAudience.Public @InterfaceStability.Committed public SELF orphanResponseReportingEnabled(boolean orphanResponseReportingEnabled)
@InterfaceAudience.Public @InterfaceStability.Committed public SELF orphanResponseReporter(OrphanResponseReporter orphanResponseReporter)
@InterfaceAudience.Public @InterfaceStability.Uncommitted public SELF networkResolution(NetworkResolution networkResolution)
Allows to tune the network resolution setting, pinning it to either internal or external instead of relying on the automatic mechanism.
networkResolution
- the network resolution to use.public DefaultCoreEnvironment build()
Copyright © 2018 Couchbase, Inc.. All rights reserved.