public enum DurabilityLevel extends Enum<DurabilityLevel>
Enum Constant and Description |
---|
MAJORITY
The mutation must be replicated to (that is, held in the memory allocated to the bucket on) a majority of
the Data Service nodes.
|
MAJORITY_AND_PERSIST_TO_ACTIVE
The mutation must be replicated to a majority of the Data Service nodes.
|
NONE
No enhanced durability configured for the mutation.
|
PERSIST_TO_MAJORITY
The mutation must be persisted to a majority of the Data Service nodes.
|
Modifier and Type | Method and Description |
---|---|
byte |
code() |
static DurabilityLevel |
decodeFromManagementApi(String input)
Decodes the string representation of the durability level from the management API into an enum.
|
String |
encodeForManagementApi()
Encodes the
DurabilityLevel so that the management API understands it. |
static DurabilityLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DurabilityLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DurabilityLevel NONE
public static final DurabilityLevel MAJORITY
public static final DurabilityLevel MAJORITY_AND_PERSIST_TO_ACTIVE
Additionally, it must be persisted (that is, written and synchronised to disk) on the node hosting the active partition (vBucket) for the data.
public static final DurabilityLevel PERSIST_TO_MAJORITY
Accordingly, it will be written to disk on those nodes.
public static DurabilityLevel[] values()
for (DurabilityLevel c : DurabilityLevel.values()) System.out.println(c);
public static DurabilityLevel valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Stability.Internal public byte code()
@Stability.Internal public static DurabilityLevel decodeFromManagementApi(String input)
input
- the management API string.@Stability.Internal public String encodeForManagementApi()
DurabilityLevel
so that the management API understands it.Copyright © 2021 Couchbase, Inc.. All rights reserved.