Class ClusterEnvironment
- All Implemented Interfaces:
AutoCloseable
If not created explicitly by the user, the SDK will create its own one internally that can also be accessed
by the user. If this is the case it does not need to be shut down manually. If the environment is passed in
to the ClusterOptions
though the user is responsible for shutting it down after
the cluster is disconnected!
Since the ClusterEnvironment
extends the CoreEnvironment
, most options can be found on the parent
class for documentation purposes.
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.couchbase.client.core.env.CoreEnvironment
DEFAULT_MAX_NUM_REQUESTS_IN_RETRY
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClusterEnvironment.Builder
builder()
Creates aClusterEnvironment.Builder
to customize the properties of the environment.protected VersionAndGitHash
static ClusterEnvironment
create()
Creates a newClusterEnvironment
with default settings.Returns the low-level cryptography manager for Field-Level Encryption if one has been configured.protected String
Returns the default serializer used to serialize and deserialize JSON values.Returns the default transcoder used for all operations if not overridden on a per-operation basis.Methods inherited from class com.couchbase.client.core.env.CoreEnvironment
clientHash, clientVersion, close, compressionConfig, coreHash, coreVersion, eventBus, executor, exportAsString, ioConfig, ioEnvironment, loggerConfig, maxNumRequestsInRetry, meter, orphanReporter, requestCallbacks, requestTracer, retryStrategy, scheduler, securityConfig, shutdown, shutdown, shutdownAsync, shutdownAsync, shutdownReactive, shutdownReactive, timeoutConfig, timer, toString, transactionsConfig, transactionsSchedulers, userAgent
-
Method Details
-
defaultAgentTitle
- Overrides:
defaultAgentTitle
in classCoreEnvironment
-
clientVersionAndGitHash
- Overrides:
clientVersionAndGitHash
in classCoreEnvironment
-
create
Creates a newClusterEnvironment
with default settings.- Returns:
- a new environment with default settings.
-
builder
Creates aClusterEnvironment.Builder
to customize the properties of the environment.- Returns:
- the
ClusterEnvironment.Builder
to customize.
-
transcoder
Returns the default transcoder used for all operations if not overridden on a per-operation basis. -
jsonSerializer
Returns the default serializer used to serialize and deserialize JSON values. -
cryptoManager
Returns the low-level cryptography manager for Field-Level Encryption if one has been configured.Useful for implementing encryption with external JSON libraries.
See
JsonObjectCrypto
for a high level alternative that's compatible with CouchbaseJsonObject
s.Note: Use of the Field-Level Encryption functionality is subject to the Couchbase Inc. Enterprise Subscription License Agreement v7
-