Package com.couchbase.client.java.env
Class ClusterEnvironment.Builder
- java.lang.Object
-
- com.couchbase.client.core.env.CoreEnvironment.Builder<ClusterEnvironment.Builder>
-
- com.couchbase.client.java.env.ClusterEnvironment.Builder
-
- Enclosing class:
- ClusterEnvironment
public static class ClusterEnvironment.Builder extends CoreEnvironment.Builder<ClusterEnvironment.Builder>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClusterEnvironmentbuild()Turns this builder into a realClusterEnvironment.ClusterEnvironment.BuildercryptoManager(CryptoManager cryptoManager)Sets the cryptography manager for Field-Level Encryption (reading and writing encrypted document fields).ClusterEnvironment.BuilderjsonSerializer(JsonSerializer jsonSerializer)Sets the default serializer for converting between JSON and Java objects.ClusterEnvironment.Builderload(ClusterPropertyLoader loader)Immediately loads the properties from the given loader into the environment.ClusterEnvironment.Buildertranscoder(Transcoder transcoder)Allows to override the default transcoder going to be used for all KV operations.-
Methods inherited from class com.couchbase.client.core.env.CoreEnvironment.Builder
addRequestCallback, compressionConfig, compressionConfig, eventBus, ioConfig, ioConfig, ioEnvironment, ioEnvironment, ioEnvironmentConfig, load, loggerConfig, loggerConfig, loggingMeterConfig, loggingMeterConfig, maxNumRequestsInRetry, meter, orphanReporterConfig, orphanReporterConfig, requestTracer, retryStrategy, scheduler, securityConfig, securityConfig, self, thresholdLoggingTracerConfig, thresholdLoggingTracerConfig, thresholdRequestTracerConfig, thresholdRequestTracerConfig, timeoutConfig, timeoutConfig
-
-
-
-
Method Detail
-
load
public ClusterEnvironment.Builder load(ClusterPropertyLoader loader)
Immediately loads the properties from the given loader into the environment.- Parameters:
loader- the loader to load the properties from.- Returns:
- this
ClusterEnvironment.Builderfor chaining purposes.
-
jsonSerializer
public ClusterEnvironment.Builder jsonSerializer(JsonSerializer jsonSerializer)
Sets the default serializer for converting between JSON and Java objects.Providing your own serializer gives you complete control over the conversion.
If this method is not called, the client's behavior depends on whether Jackson is in the class path. If Jackson is present, an instance of
JacksonJsonSerializerwill be used. Otherwise the client will fall back toDefaultJsonSerializer.- Parameters:
jsonSerializer- the serializer used for all JSON values.- Returns:
- this
ClusterEnvironment.Builderfor chaining purposes. - See Also:
JacksonJsonSerializer
-
transcoder
public ClusterEnvironment.Builder transcoder(Transcoder transcoder)
Allows to override the default transcoder going to be used for all KV operations.- Parameters:
transcoder- the transcoder that should be used by default.- Returns:
- this
ClusterEnvironment.Builderfor chaining purposes.
-
cryptoManager
public ClusterEnvironment.Builder cryptoManager(CryptoManager cryptoManager)
Sets the cryptography manager for Field-Level Encryption (reading and writing encrypted document fields).Note: Use of the Field-Level Encryption functionality is subject to the Couchbase Inc. Enterprise Subscription License Agreement v7
- Parameters:
cryptoManager- (nullable) the manager to use, or null to disable encryption support.- Returns:
- this builder for chaining purposes.
-
build
public ClusterEnvironment build()
Turns this builder into a realClusterEnvironment.- Overrides:
buildin classCoreEnvironment.Builder<ClusterEnvironment.Builder>- Returns:
- the created cluster environment.
-
-