Package org.rocksdb
Enum Class CompactionPriority
- All Implemented Interfaces:
Serializable,Comparable<CompactionPriority>,Constable
Compaction Priorities
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSlightly Prioritize larger files by size compensated by #deletesFirst compact files whose ratio between overlapping size in next level and its size is the smallest.First compact files whose data's latest update time is oldest.First compact files whose range hasn't been compacted to the next level for the longest.Keeps a cursor(s) of the successor of the file (key range) was/were compacted before, and always picks the next files (key range) in that level. -
Method Summary
Modifier and TypeMethodDescriptionstatic CompactionPrioritygetCompactionPriority(byte value) Get CompactionPriority by byte value.bytegetValue()Returns the byte value of the enumerations valuestatic CompactionPriorityReturns the enum constant of this class with the specified name.static CompactionPriority[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ByCompensatedSize
Slightly Prioritize larger files by size compensated by #deletes -
OldestLargestSeqFirst
First compact files whose data's latest update time is oldest. Try this if you only update some hot keys in small ranges. -
OldestSmallestSeqFirst
First compact files whose range hasn't been compacted to the next level for the longest. If your updates are random across the key space, write amplification is slightly better with this option. -
MinOverlappingRatio
First compact files whose ratio between overlapping size in next level and its size is the smallest. It in many cases can optimize write amplification. -
RoundRobin
Keeps a cursor(s) of the successor of the file (key range) was/were compacted before, and always picks the next files (key range) in that level. The file picking process will cycle through all the files in a round-robin manner.
-
-
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
-
getCompactionPriority
Get CompactionPriority by byte value.- Parameters:
value- byte representation of CompactionPriority.- Returns:
CompactionPriorityinstance or null.- Throws:
IllegalArgumentException- if an invalid value is provided.
-