Package org.rocksdb
Enum WALRecoveryMode
- java.lang.Object
-
- java.lang.Enum<WALRecoveryMode>
-
- org.rocksdb.WALRecoveryMode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<WALRecoveryMode>
public enum WALRecoveryMode extends java.lang.Enum<WALRecoveryMode>
The WAL Recover Mode
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AbsoluteConsistencyRecover from clean shutdown We 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 guaranteePointInTimeRecoveryRecover 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 dataSkipAnyCorruptedRecordsRecovery 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 dataTolerateCorruptedTailRecordsOriginal levelDB recovery We tolerate incomplete record in trailing data on all logs Use case : This is legacy behavior (default)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description bytegetValue()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 WALRecoveryModevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static WALRecoveryMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TolerateCorruptedTailRecords
public static final WALRecoveryMode TolerateCorruptedTailRecords
Original levelDB recovery We tolerate incomplete record in trailing data on all logs Use case : This is legacy behavior (default)
-
AbsoluteConsistency
public static final WALRecoveryMode AbsoluteConsistency
Recover from clean shutdown We 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
public static final WALRecoveryMode 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
public static final WALRecoveryMode 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 Detail
-
values
public static WALRecoveryMode[] 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 (WALRecoveryMode c : WALRecoveryMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WALRecoveryMode 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
-
getWALRecoveryMode
public static WALRecoveryMode getWALRecoveryMode(byte byteIdentifier)
Get the WALRecoveryMode enumeration value by passing the byte identifier to this method.
- Parameters:
byteIdentifier- of WALRecoveryMode.- Returns:
- WALRecoveryMode instance.
- Throws:
java.lang.IllegalArgumentException- If WALRecoveryMode cannot be found for the provided byteIdentifier
-
-