public class DefaultCouchbaseEnvironment extends DefaultCoreEnvironment implements CouchbaseEnvironment
The default implementation of a CouchbaseEnvironment
.
This environment is intended to be reused and passed in across AsyncCluster
instances. It is stateful and needs to be shut down manually if it was passed in by the user. Some threads it manages are non-daemon threads.
Default settings can be customized through the DefaultCouchbaseEnvironment.Builder
or through the setting of system properties. Latter ones take always precedence and can be used to override builder settings at runtime too.
Modifier and Type | Class and Description |
---|---|
static class |
DefaultCouchbaseEnvironment.Builder |
Modifier and Type | Field and Description |
---|---|
protected static String |
CLIENT_GIT_VERSION |
protected static String |
CLIENT_VERSION |
static String |
SDK_PACKAGE_NAME_AND_VERSION |
static String |
SDK_USER_AGENT |
AUTORELEASE_AFTER, BOOTSTRAP_CARRIER_DIRECT_PORT, BOOTSTRAP_CARRIER_ENABLED, BOOTSTRAP_CARRIER_SSL_PORT, BOOTSTRAP_HTTP_DIRECT_PORT, BOOTSTRAP_HTTP_ENABLED, BOOTSTRAP_HTTP_SSL_PORT, BUFFER_POOLING_ENABLED, CALLBACKS_ON_IO_POOL, COMPUTATION_POOL_SIZE, CORE_GIT_VERSION, CORE_VERSION, DCP_CONNECTION_BUFFER_ACK_THRESHOLD, DCP_CONNECTION_BUFFER_SIZE, DCP_CONNECTION_NAME, DCP_ENABLED, DISCONNECT_TIMEOUT, IO_POOL_SIZE, KEEPALIVEINTERVAL, KEYVALUE_ENDPOINTS, MAX_REQUEST_LIFETIME, MEMCACHED_HASHING_STRATEGY, MUTATION_TOKENS_ENABLED, OBSERVE_INTERVAL_DELAY, PACKAGE_NAME_AND_VERSION, QUERY_ENDPOINTS, RECONNECT_DELAY, REQUEST_BUFFER_SIZE, RESPONSE_BUFFER_SIZE, RETRY_DELAY, RETRY_STRATEGY, SEARCH_ENDPOINTS, SOCKET_CONNECT_TIMEOUT, SSL_ENABLED, SSL_KEYSTORE, SSL_KEYSTORE_FILE, SSL_KEYSTORE_PASSWORD, TCP_NODELAY_ENALED, USER_AGENT, VIEW_ENDPOINTS
Modifier and Type | Method and Description |
---|---|
static DefaultCouchbaseEnvironment.Builder |
builder()
Returns the
DefaultCouchbaseEnvironment.Builder to customize environment settings. |
String |
clientBuild()
Returns build information on the Couchbase Java SDK client.
|
String |
clientVersion()
Returns version information on the Couchbase Java SDK client.
|
long |
connectTimeout()
The default timeout for connect operations, set to
CONNECT_TIMEOUT . |
static DefaultCouchbaseEnvironment |
create()
Creates a
CouchbaseEnvironment with default settings applied. |
boolean |
dnsSrvEnabled()
Returns whether DNS SRV lookup for the bootstrap nodes is enabled or not.
|
protected StringBuilder |
dumpParameters(StringBuilder sb) |
long |
kvTimeout()
The default timeout for binary (key/value) operations, set to
KV_TIMEOUT . |
long |
managementTimeout()
The default timeout for management operations, set to
MANAGEMENT_TIMEOUT . |
long |
queryTimeout()
The default timeout for query operations, set to
QUERY_TIMEOUT . |
long |
searchTimeout()
The default timeout for search operations, set to
SEARCH_TIMEOUT . |
String |
toString() |
long |
viewTimeout()
The default timeout for view operations, set to
VIEW_TIMEOUT . |
autoreleaseAfter, booleanPropertyOr, bootstrapCarrierDirectPort, bootstrapCarrierEnabled, bootstrapCarrierSslPort, bootstrapHttpDirectPort, bootstrapHttpEnabled, bootstrapHttpSslPort, bufferPoolingEnabled, callbacksOnIoPool, computationPoolSize, coreBuild, coreVersion, dcpConnectionBufferAckThreshold, dcpConnectionBufferSize, dcpConnectionName, dcpEnabled, disconnectTimeout, doublePropertyOr, eventBus, instanceCounter, intPropertyOr, ioPool, ioPoolSize, keepAliveInterval, kvEndpoints, kvIoPool, longPropertyOr, maxRequestLifetime, memcachedHashingStrategy, mutationTokensEnabled, networkLatencyMetricsCollector, observeIntervalDelay, packageNameAndVersion, queryEndpoints, queryIoPool, reconnectDelay, requestBufferSize, requestBufferWaitStrategy, responseBufferSize, retryDelay, retryStrategy, runtimeMetricsCollector, scheduler, searchEndpoints, searchIoPool, shutdown, shutdown, shutdownAsync, socketConnectTimeout, sslEnabled, sslKeystore, sslKeystoreFile, sslKeystorePassword, stringPropertyOr, tcpNodelayEnabled, userAgent, viewEndpoints, viewIoPool
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
autoreleaseAfter, bootstrapCarrierDirectPort, bootstrapCarrierEnabled, bootstrapCarrierSslPort, bootstrapHttpDirectPort, bootstrapHttpEnabled, bootstrapHttpSslPort, bufferPoolingEnabled, callbacksOnIoPool, computationPoolSize, coreBuild, coreVersion, dcpConnectionBufferAckThreshold, dcpConnectionBufferSize, dcpConnectionName, dcpEnabled, disconnectTimeout, eventBus, ioPool, ioPoolSize, keepAliveInterval, kvEndpoints, kvIoPool, maxRequestLifetime, mutationTokensEnabled, networkLatencyMetricsCollector, observeIntervalDelay, packageNameAndVersion, queryEndpoints, queryIoPool, reconnectDelay, requestBufferSize, requestBufferWaitStrategy, responseBufferSize, retryDelay, retryStrategy, runtimeMetricsCollector, scheduler, searchEndpoints, searchIoPool, shutdown, shutdown, shutdownAsync, socketConnectTimeout, tcpNodelayEnabled, userAgent, viewEndpoints, viewIoPool
sslEnabled, sslKeystore, sslKeystoreFile, sslKeystorePassword
memcachedHashingStrategy
protected static String CLIENT_VERSION
protected static String CLIENT_GIT_VERSION
public static String SDK_PACKAGE_NAME_AND_VERSION
public static String SDK_USER_AGENT
public static DefaultCouchbaseEnvironment create()
Creates a CouchbaseEnvironment
with default settings applied.
DefaultCouchbaseEnvironment
with default settings.public static DefaultCouchbaseEnvironment.Builder builder()
Returns the DefaultCouchbaseEnvironment.Builder
to customize environment settings.
DefaultCouchbaseEnvironment.Builder
.public long managementTimeout()
CouchbaseEnvironment
The default timeout for management operations, set to MANAGEMENT_TIMEOUT
.
managementTimeout
in interface CouchbaseEnvironment
public long queryTimeout()
CouchbaseEnvironment
The default timeout for query operations, set to QUERY_TIMEOUT
.
queryTimeout
in interface CouchbaseEnvironment
public long viewTimeout()
CouchbaseEnvironment
The default timeout for view operations, set to VIEW_TIMEOUT
.
viewTimeout
in interface CouchbaseEnvironment
public long searchTimeout()
CouchbaseEnvironment
The default timeout for search operations, set to SEARCH_TIMEOUT
.
searchTimeout
in interface CouchbaseEnvironment
public long kvTimeout()
CouchbaseEnvironment
The default timeout for binary (key/value) operations, set to KV_TIMEOUT
.
kvTimeout
in interface CouchbaseEnvironment
public long connectTimeout()
CouchbaseEnvironment
The default timeout for connect operations, set to CONNECT_TIMEOUT
.
connectTimeout
in interface CouchbaseEnvironment
public boolean dnsSrvEnabled()
CouchbaseEnvironment
Returns whether DNS SRV lookup for the bootstrap nodes is enabled or not.
dnsSrvEnabled
in interface CouchbaseEnvironment
public String clientVersion()
CouchbaseEnvironment
Returns version information on the Couchbase Java SDK client. Version number is in the form MAJOR.MINOR.PATCH, and is the one for the java-client layer.
clientVersion
in interface CouchbaseEnvironment
for a more specific build information (relevant for tracking
the exact version of the code the client was built from)
,
for the same information but relative to the core layer.
public String clientBuild()
CouchbaseEnvironment
Returns build information on the Couchbase Java SDK client. This has a better granularity than CouchbaseEnvironment.clientVersion()
and thus is more relevant to track the exact version of the code the client was built from.
Build information can contain VCS information like commit numbers, tags, etc…
clientBuild
in interface CouchbaseEnvironment
for more generic version information.
,
for the same information but relative to the core layer.
protected StringBuilder dumpParameters(StringBuilder sb)
dumpParameters
in class DefaultCoreEnvironment
public String toString()
toString
in class DefaultCoreEnvironment
Copyright © 2015 Couchbase, Inc.