Package org.rocksdb
Enum Class WALRecoveryMode
- All Implemented Interfaces:
Serializable,Comparable<WALRecoveryMode>,Constable
The WAL Recover Mode
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRecover from clean shutdownRecover to point-in-time consistency We stop the WAL playback on discovering WAL inconsistency Use case : Ideal for systems that have disk controller cache like hard disk, SSD without super capacitor that store related dataRecovery after a disaster We ignore any corruption in the WAL and try to salvage as much data as possible Use case : Ideal for last ditch effort to recover data or systems that operate with low grade unrelated dataOriginal levelDB recovery -
Method Summary
Modifier and TypeMethodDescriptionbytegetValue()Returns the byte value of the enumerations value.static WALRecoveryModegetWALRecoveryMode(byte byteIdentifier) Get the WALRecoveryMode enumeration value by passing the byte identifier to this method.static WALRecoveryModeReturns the enum constant of this class with the specified name.static WALRecoveryMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TolerateCorruptedTailRecords
Original levelDB recoveryWe tolerate incomplete record in trailing data on all logs Use case : This is legacy behavior (default)
-
AbsoluteConsistency
Recover from clean shutdownWe don't expect to find any corruption in the WAL Use case : This is ideal for unit tests and rare applications that can require high consistency guarantee
-
PointInTimeRecovery
Recover to point-in-time consistency We stop the WAL playback on discovering WAL inconsistency Use case : Ideal for systems that have disk controller cache like hard disk, SSD without super capacitor that store related data -
SkipAnyCorruptedRecords
Recovery after a disaster We ignore any corruption in the WAL and try to salvage as much data as possible Use case : Ideal for last ditch effort to recover data or systems that operate with low grade unrelated data
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public byte getValue()Returns the byte value of the enumerations value.
- Returns:
- byte representation
-
getWALRecoveryMode
Get the WALRecoveryMode enumeration value by passing the byte identifier to this method.
- Parameters:
byteIdentifier- of WALRecoveryMode.- Returns:
- WALRecoveryMode instance.
- Throws:
IllegalArgumentException- If WALRecoveryMode cannot be found for the provided byteIdentifier
-