Package org.rocksdb

Enum Class CompactionStyle

java.lang.Object
java.lang.Enum<CompactionStyle>
org.rocksdb.CompactionStyle
All Implemented Interfaces:
Serializable, Comparable<CompactionStyle>, Constable

public enum CompactionStyle extends Enum<CompactionStyle>
Enum CompactionStyle

RocksDB supports different styles of compaction. Available compaction styles can be chosen using this enumeration.

  1. LEVEL - Level based Compaction style
  2. UNIVERSAL - Universal Compaction Style is a compaction style, targeting the use cases requiring lower write amplification, trading off read amplification and space amplification.
  3. FIFO - FIFO compaction style is the simplest compaction strategy. It is suited for keeping event log data with very low overhead (query log for example). It periodically deletes the old data, so it's basically a TTL compaction style.
  4. NONE - Disable background compaction. Compaction jobs are submitted RocksDB.compactFiles(CompactionOptions, ColumnFamilyHandle, java.util.List, int, int, CompactionJobInfo) ()}.
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static CompactionStyle[] 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

      public static CompactionStyle valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getValue

      public byte getValue()
      Get the internal representation value.
      Returns:
      the internal representation value.