Package com.couchbase.client.core.api.kv
Class CoreDurability
- java.lang.Object
-
- com.couchbase.client.core.api.kv.CoreDurability
-
@Internal public final class CoreDurability extends Object
Either a synchronousDurabilityLevel
, or "persist to and replicate to" for legacy durability.
-
-
Field Summary
Fields Modifier and Type Field Description static CoreDurability
NONE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLegacy()
boolean
isNone()
boolean
isPersistent()
Observe.ObservePersistTo
legacyPersistTo()
Observe.ObserveReplicateTo
legacyReplicateTo()
Optional<DurabilityLevel>
levelIfSynchronous()
static CoreDurability
of(DurabilityLevel level)
static CoreDurability
of(Observe.ObservePersistTo persistTo, Observe.ObserveReplicateTo replicateTo)
String
toString()
-
-
-
Field Detail
-
NONE
public static final CoreDurability NONE
-
-
Method Detail
-
of
public static CoreDurability of(DurabilityLevel level)
-
of
public static CoreDurability of(Observe.ObservePersistTo persistTo, Observe.ObserveReplicateTo replicateTo)
-
isNone
public boolean isNone()
-
isLegacy
public boolean isLegacy()
-
isPersistent
public boolean isPersistent()
-
levelIfSynchronous
public Optional<DurabilityLevel> levelIfSynchronous()
-
legacyPersistTo
@Nullable public Observe.ObservePersistTo legacyPersistTo()
-
legacyReplicateTo
@Nullable public Observe.ObserveReplicateTo legacyReplicateTo()
-
-