Package org.rocksdb
Enum TxnDBWritePolicy
- java.lang.Object
-
- java.lang.Enum<TxnDBWritePolicy>
-
- org.rocksdb.TxnDBWritePolicy
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<TxnDBWritePolicy>
public enum TxnDBWritePolicy extends java.lang.Enum<TxnDBWritePolicy>
The transaction db write policy.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description WRITE_COMMITTEDWrite only the committed data.WRITE_PREPAREDWrite data after the prepare phase of 2pc.WRITE_UNPREPAREDWrite data before the prepare phase of 2pc.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TxnDBWritePolicygetTxnDBWritePolicy(byte byteIdentifier)Get the TxnDBWritePolicy enumeration value by passing the byte identifier to this method.bytegetValue()Returns the byte value of the enumerations value.static TxnDBWritePolicyvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TxnDBWritePolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WRITE_COMMITTED
public static final TxnDBWritePolicy WRITE_COMMITTED
Write only the committed data.
-
WRITE_PREPARED
public static final TxnDBWritePolicy WRITE_PREPARED
Write data after the prepare phase of 2pc.
-
WRITE_UNPREPARED
public static final TxnDBWritePolicy WRITE_UNPREPARED
Write data before the prepare phase of 2pc.
-
-
Method Detail
-
values
public static TxnDBWritePolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TxnDBWritePolicy c : TxnDBWritePolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TxnDBWritePolicy valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getValue
public byte getValue()
Returns the byte value of the enumerations value.
- Returns:
- byte representation
-
getTxnDBWritePolicy
public static TxnDBWritePolicy getTxnDBWritePolicy(byte byteIdentifier)
Get the TxnDBWritePolicy enumeration value by passing the byte identifier to this method.
- Parameters:
byteIdentifier- of TxnDBWritePolicy.- Returns:
- TxnDBWritePolicy instance.
- Throws:
java.lang.IllegalArgumentException- If TxnDBWritePolicy cannot be found for the provided byteIdentifier
-
-