Package org.rocksdb

Enum CompactionStyle

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CompactionStyle>

    public enum CompactionStyle
    extends java.lang.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, List, int, int, CompactionJobInfo) ()}.
    See Also:
    Universal Compaction, FIFO Compaction
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte getValue()
      Get the internal representation value.
      static CompactionStyle valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CompactionStyle[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static CompactionStyle[] 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 (CompactionStyle c : CompactionStyle.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CompactionStyle 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 name
        java.lang.NullPointerException - if the argument is null
      • getValue

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