Class CoreEnvironment
- All Implemented Interfaces:
ReactorOps
,AutoCloseable
Note that unless you are using the core directly, you want to consider the child implementations for each language binding (i.e. the ClusterEnvironment for the java client).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Default maximum requests being queued in retry before performing backpressure cancellations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CoreEnvironment.Builder
<?> builder()
If present, returns the git hash for the client at build time.If present, returns the client version at build time.protected VersionAndGitHash
Subclasses should override to return version info for the "wrapper" (language-specific SDK).void
close()
Returns the current compression configuration.coreHash()
If present, returns the git hash for the core at build time.If present, returns the core version at build time.static CoreEnvironment
create()
protected String
Returns the default user agent name that is used as part of the resulting string.eventBus()
The central event bus which manages all kinds of messages flowing throughout the client.executor()
Returns the executor used to schedule non-reactive async tasks across the SDK.exportAsString
(Context.ExportFormat format) Export this environment into the specified format.ioConfig()
Returns the current configuration for all I/O-related settings.Holds the environmental configuration/state that is tied to the IO layer.Returns the current logger configuration.long
Returns the maximum number of requests allowed in retry, before no more ops are allowed and canceled.meter()
Returns the orphan reporter on this environment.The preferred server group to use for operations that support such.<T> Flux
<T> publishOnUserScheduler
(Flux<T> flux) <T> Mono
<T> publishOnUserScheduler
(Mono<T> mono) Returns the request tracer for response time observability.Returns the retry strategy on this environment.Returns the scheduler used to schedule reactive, async tasks across the SDK.Returns the current security configuration (TLS etc.).void
shutdown()
Shuts down this Environment with the default disconnect timeout.void
Shuts down this Environment with a custom timeout.Shuts down this Environment with the default disconnect timeout.shutdownAsync
(Duration timeout) Shuts down this Environment with a custom timeout.Shuts down this Environment with the default disconnect timeout.shutdownReactive
(Duration timeout) Shuts down this Environment with a custom timeout.Returns the configuration for all default timeouts.timer()
Returns the timer used to schedule timeouts and retries amongst other tasks.toString()
The schedulers used for any transactional operations.User agent used to identify this client against the server.Returns the supplier for the scheduler where Reactive API results should be published, or null if the user does not want to switch schedulers.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.couchbase.client.core.util.ReactorOps
publishOnUserScheduler
-
Field Details
-
DEFAULT_MAX_NUM_REQUESTS_IN_RETRY
public static final long DEFAULT_MAX_NUM_REQUESTS_IN_RETRYDefault maximum requests being queued in retry before performing backpressure cancellations.- See Also:
-
-
Constructor Details
-
CoreEnvironment
-
-
Method Details
-
create
-
builder
-
defaultAgentTitle
Returns the default user agent name that is used as part of the resulting string. -
clientVersionAndGitHash
Subclasses should override to return version info for the "wrapper" (language-specific SDK). -
clientHash
If present, returns the git hash for the client at build time. -
coreHash
If present, returns the git hash for the core at build time. -
clientVersion
If present, returns the client version at build time. -
coreVersion
If present, returns the core version at build time. -
userAgent
User agent used to identify this client against the server. -
eventBus
The central event bus which manages all kinds of messages flowing throughout the client.- Returns:
- the event bus currently in use.
-
ioEnvironment
Holds the environmental configuration/state that is tied to the IO layer. -
ioConfig
Returns the current configuration for all I/O-related settings. -
timeoutConfig
Returns the configuration for all default timeouts. -
securityConfig
Returns the current security configuration (TLS etc.). -
compressionConfig
Returns the current compression configuration. -
loggerConfig
Returns the current logger configuration. -
scheduler
Returns the scheduler used to schedule reactive, async tasks across the SDK. -
userScheduler
Returns the supplier for the scheduler where Reactive API results should be published, or null if the user does not want to switch schedulers. -
publishOnUserScheduler
- Specified by:
publishOnUserScheduler
in interfaceReactorOps
-
publishOnUserScheduler
- Specified by:
publishOnUserScheduler
in interfaceReactorOps
-
executor
Returns the executor used to schedule non-reactive async tasks across the SDK. -
requestTracer
Returns the request tracer for response time observability.Note that this right now is unsupported, volatile API and subject to change!
-
meter
-
requestCallbacks
-
timer
Returns the timer used to schedule timeouts and retries amongst other tasks. -
retryStrategy
Returns the retry strategy on this environment. -
orphanReporter
Returns the orphan reporter on this environment. -
maxNumRequestsInRetry
public long maxNumRequestsInRetry()Returns the maximum number of requests allowed in retry, before no more ops are allowed and canceled. -
transactionsConfig
-
transactionsSchedulers
The schedulers used for any transactional operations. -
preferredServerGroup
The preferred server group to use for operations that support such. -
shutdownAsync
Shuts down this Environment with the default disconnect timeout.Note that once shutdown, the environment cannot be restarted so it is advised to perform this operation at the very last operation in the SDK shutdown process.
-
shutdownAsync
Shuts down this Environment with a custom timeout.Note that once shutdown, the environment cannot be restarted so it is advised to perform this operation at the very last operation in the SDK shutdown process.
- Parameters:
timeout
- the timeout to wait maximum.
-
shutdownReactive
Shuts down this Environment with the default disconnect timeout.Note that once shutdown, the environment cannot be restarted so it is advised to perform this operation at the very last operation in the SDK shutdown process.
-
shutdownReactive
Shuts down this Environment with a custom timeout.Note that once shutdown, the environment cannot be restarted so it is advised to perform this operation at the very last operation in the SDK shutdown process.
- Parameters:
timeout
- the timeout to wait maximum.
-
shutdown
Shuts down this Environment with a custom timeout.Note that once shutdown, the environment cannot be restarted so it is advised to perform this operation at the very last operation in the SDK shutdown process.
- Parameters:
timeout
- the timeout to wait maximum.
-
shutdown
public void shutdown()Shuts down this Environment with the default disconnect timeout.Note that once shutdown, the environment cannot be restarted so it is advised to perform this operation at the very last operation in the SDK shutdown process.
-
exportAsString
Export this environment into the specified format.- Parameters:
format
- the format to export into.- Returns:
- the exported format as a string representation.
-
toString
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-