public abstract class CommonOptions<SELF extends CommonOptions<SELF>> extends Object
Modifier and Type | Class and Description |
---|---|
class |
CommonOptions.BuiltCommonOptions |
Constructor and Description |
---|
CommonOptions() |
Modifier and Type | Method and Description |
---|---|
SELF |
clientContext(Map<String,Object> clientContext)
Specifies custom, client domain specific context metadata with this operation.
|
SELF |
parentSpan(RequestSpan parentSpan)
Allows to specify a parent span that should be used on top of this request.
|
SELF |
retryStrategy(RetryStrategy retryStrategy)
Specifies a custom
RetryStrategy for this operation. |
protected SELF |
self()
Allows to return the right options builder instance for child implementations.
|
SELF |
timeout(Duration timeout)
Specifies a custom per-operation timeout.
|
protected SELF self()
public SELF timeout(Duration timeout)
Note: if a custom timeout is provided through this builder, it will override the default set on the environment.
timeout
- the timeout to use for this operation.public SELF retryStrategy(RetryStrategy retryStrategy)
RetryStrategy
for this operation.
Note: if a custom strategy is provided through this builder, it will override the default set on the environment.
retryStrategy
- the retry strategy to use for this operation.public SELF clientContext(Map<String,Object> clientContext)
clientContext
- the client context information as a map.@Stability.Volatile public SELF parentSpan(RequestSpan parentSpan)
Note that this only has impact when using a tracing implementation that can actually deal with the notion of a parent. You likely want to use this if you want to wire up your application with OpenTracing or OpenTelemetry - use the support separate modules for that.
IMPORTANT: this is a volatile, likely to change API!
parentSpan
- the parent span for this request.Copyright © 2020 Couchbase, Inc.. All rights reserved.