Package com.couchbase.client.core.msg.kv
Enum DurabilityLevel
- All Implemented Interfaces:
Serializable
,Comparable<DurabilityLevel>
Specifies enhanced durability options for the mutation.
-
Enum Constant Summary
Enum ConstantDescriptionThe mutation must be replicated to (that is, held in the memory allocated to the bucket on) a majority of the Data Service nodes.The mutation must be replicated to a majority of the Data Service nodes.No enhanced durability configured for the mutation.The mutation must be persisted to a majority of the Data Service nodes. -
Method Summary
Modifier and TypeMethodDescriptionbyte
code()
static DurabilityLevel
decodeFromManagementApi
(String input) Decodes the string representation of the durability level from the management API into an enum.Encodes theDurabilityLevel
so that the management API understands it.static DurabilityLevel
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.
-
Enum Constant Details
-
NONE
No enhanced durability configured for the mutation. -
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.Additionally, it must be persisted (that is, written and synchronised to disk) on the node hosting the active partition (vBucket) for the data.
-
PERSIST_TO_MAJORITY
The mutation must be persisted to a majority of the Data Service nodes.Accordingly, it will be written to disk on those nodes.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
code
-
decodeFromManagementApi
Decodes the string representation of the durability level from the management API into an enum.- Parameters:
input
- the management API string.- Returns:
- the encoded durability enum. Note that it will be NONE if input is null or unknown.
-
encodeForManagementApi
Encodes theDurabilityLevel
so that the management API understands it.- Returns:
- the encoded durability level for the management API.
-