Package com.couchbase.client.java.kv
Class CommonDurabilityOptions<SELF extends CommonDurabilityOptions<SELF>>
java.lang.Object
com.couchbase.client.java.CommonOptions<SELF>
com.couchbase.client.java.kv.CommonDurabilityOptions<SELF>
- Direct Known Subclasses:
AppendOptions
,DecrementOptions
,IncrementOptions
,InsertOptions
,MutateInOptions
,PrependOptions
,RemoveOptions
,ReplaceOptions
,UpsertOptions
public abstract class CommonDurabilityOptions<SELF extends CommonDurabilityOptions<SELF>>
extends CommonOptions<SELF>
Extends the
CommonOptions
to also include the durability requirements.- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.couchbase.client.java.CommonOptions
CommonOptions.BuiltCommonOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondurability
(DurabilityLevel durabilityLevel) Allows to customize the enhanced durability requirements for this operation.durability
(PersistTo persistTo, ReplicateTo replicateTo) Allows to customize the poll-based durability requirements for this operation.Methods inherited from class com.couchbase.client.java.CommonOptions
clientContext, parentSpan, retryStrategy, self, timeout
-
Constructor Details
-
CommonDurabilityOptions
public CommonDurabilityOptions()
-
-
Method Details
-
durability
Allows to customize the poll-based durability requirements for this operation.Note: if a
durability(DurabilityLevel)
has been set beforehand it will be set back toDurabilityLevel.NONE
, since it is not allowed to use both mechanisms at the same time.- Parameters:
persistTo
- the durability persistence requirement.replicateTo
- the durability replication requirement.- Returns:
- this options builder for chaining purposes.
-
durability
Allows to customize the enhanced durability requirements for this operation.Note: if a
durability(PersistTo, ReplicateTo)
has been set beforehand it will be set back toPersistTo.NONE
andReplicateTo.NONE
, since it is not allowed to use both mechanisms at the same time.- Parameters:
durabilityLevel
- the enhanced durability requirement.- Returns:
- this options builder for chaining purposes.
-