public class DefaultCouchbaseEnvironment extends com.couchbase.client.core.env.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 |
---|---|
static String |
SDK_PACKAGE_NAME_AND_VERSION |
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, COMPUTATION_POOL_SIZE, DCP_ENABLED, IO_POOL_SIZE, KEEPALIVEINTERVAL, KEYVALUE_ENDPOINTS, MAX_REQUEST_LIFETIME, MUTATION_TOKENS_ENABLED, OBSERVE_INTERVAL_DELAY, PACKAGE_NAME_AND_VERSION, QUERY_ENABLED, QUERY_ENDPOINTS, QUERY_PORT, RECONNECT_DELAY, REQUEST_BUFFER_SIZE, RESPONSE_BUFFER_SIZE, RETRY_DELAY, RETRY_STRATEGY, SSL_ENABLED, 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. |
long |
connectTimeout()
The default timeout for connect operations, set to
CONNECT_TIMEOUT . |
static DefaultCouchbaseEnvironment |
create()
Creates a
CouchbaseEnvironment with default settings applied. |
long |
disconnectTimeout()
The default timeout for disconnect operations, set to
DISCONNECT_TIMEOUT . |
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 . |
String |
toString() |
long |
viewTimeout()
The default timeout for view operations, set to
VIEW_TIMEOUT . |
autoreleaseAfter, booleanPropertyOr, bootstrapCarrierDirectPort, bootstrapCarrierEnabled, bootstrapCarrierSslPort, bootstrapHttpDirectPort, bootstrapHttpEnabled, bootstrapHttpSslPort, bufferPoolingEnabled, computationPoolSize, dcpEnabled, eventBus, intPropertyOr, ioPool, ioPoolSize, keepAliveInterval, kvEndpoints, longPropertyOr, maxRequestLifetime, mutationTokensEnabled, networkLatencyMetricsCollector, observeIntervalDelay, packageNameAndVersion, queryEnabled, queryEndpoints, queryPort, reconnectDelay, requestBufferSize, responseBufferSize, retryDelay, retryStrategy, runtimeMetricsCollector, scheduler, shutdown, sslEnabled, sslKeystoreFile, sslKeystorePassword, stringPropertyOr, tcpNodelayEnabled, userAgent, viewEndpoints
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
autoreleaseAfter, bootstrapCarrierDirectPort, bootstrapCarrierEnabled, bootstrapCarrierSslPort, bootstrapHttpDirectPort, bootstrapHttpEnabled, bootstrapHttpSslPort, bufferPoolingEnabled, computationPoolSize, dcpEnabled, eventBus, ioPool, ioPoolSize, keepAliveInterval, kvEndpoints, maxRequestLifetime, mutationTokensEnabled, networkLatencyMetricsCollector, observeIntervalDelay, packageNameAndVersion, queryEnabled, queryEndpoints, queryPort, reconnectDelay, requestBufferSize, responseBufferSize, retryDelay, retryStrategy, runtimeMetricsCollector, scheduler, shutdown, sslEnabled, sslKeystoreFile, sslKeystorePassword, tcpNodelayEnabled, userAgent, viewEndpoints
public static String SDK_PACKAGE_NAME_AND_VERSION
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 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 long disconnectTimeout()
CouchbaseEnvironment
The default timeout for disconnect operations, set to DISCONNECT_TIMEOUT
.
disconnectTimeout
in interface CouchbaseEnvironment
public boolean dnsSrvEnabled()
CouchbaseEnvironment
Returns whether DNS SRV lookup for the bootstrap nodes is enabled or not.
dnsSrvEnabled
in interface CouchbaseEnvironment
protected StringBuilder dumpParameters(StringBuilder sb)
dumpParameters
in class com.couchbase.client.core.env.DefaultCoreEnvironment
public String toString()
toString
in class com.couchbase.client.core.env.DefaultCoreEnvironment
Copyright © 2014 Couchbase, Inc.