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 theCommonOptionsto also include the durability requirements.- Since:
- 2.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCommonDurabilityOptions.BuiltCommonDurabilityOptions-
Nested classes/interfaces inherited from class com.couchbase.client.java.CommonOptions
CommonOptions.BuiltCommonOptions
-
-
Constructor Summary
Constructors Constructor Description CommonDurabilityOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SELFdurability(DurabilityLevel durabilityLevel)Allows to customize the enhanced durability requirements for this operation.SELFdurability(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
-
-
-
-
Method Detail
-
durability
public SELF durability(PersistTo persistTo, ReplicateTo replicateTo)
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
public SELF durability(DurabilityLevel durabilityLevel)
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.NONEandReplicateTo.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.
-
-