Package com.couchbase.client.java
Class CommonOptions<SELF extends CommonOptions<SELF>>
- java.lang.Object
-
- com.couchbase.client.java.CommonOptions<SELF>
-
- Direct Known Subclasses:
AnalyticsOptions
,AppendOptions
,DecrementOptions
,ExistsOptions
,GetAndLockOptions
,GetAndTouchOptions
,GetFromReplicaOptions
,GetOptions
,IncrementOptions
,InsertOptions
,LookupInOptions
,MutateInOptions
,PrependOptions
,QueryOptions
,RemoveOptions
,ReplaceOptions
,SearchOptions
,TouchOptions
,UnlockOptions
,UpsertOptions
,ViewOptions
public abstract class CommonOptions<SELF extends CommonOptions<SELF>> extends Object
Common options that are used by most operations.- Since:
- 2.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CommonOptions.BuiltCommonOptions
-
Constructor Summary
Constructors Constructor Description CommonOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SELF
retryStrategy(RetryStrategy retryStrategy)
Specifies a customRetryStrategy
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.
-
-
-
Method Detail
-
self
protected SELF self()
Allows to return the right options builder instance for child implementations.
-
timeout
public SELF timeout(Duration timeout)
Specifies a custom per-operation timeout.Note: if a custom timeout is provided through this builder, it will override the default set on the environment.
- Parameters:
timeout
- the timeout to use for this operation.- Returns:
- this options builder for chaining purposes.
-
retryStrategy
public SELF retryStrategy(RetryStrategy retryStrategy)
Specifies a customRetryStrategy
for this operation.Note: if a custom strategy is provided through this builder, it will override the default set on the environment.
- Parameters:
retryStrategy
- the retry strategy to use for this operation.- Returns:
- this options builder for chaining purposes.
-
-