Package org.rocksdb

Enum CompactionReason

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

    public enum CompactionReason
    extends java.lang.Enum<CompactionReason>
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CompactionReason valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CompactionReason[] 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
    • Enum Constant Detail

      • kLevelL0FilesNum

        public static final CompactionReason kLevelL0FilesNum
        [Level] number of L0 files > level0_file_num_compaction_trigger
      • kLevelMaxLevelSize

        public static final CompactionReason kLevelMaxLevelSize
        [Level] total size of level > MaxBytesForLevel()
      • kUniversalSizeAmplification

        public static final CompactionReason kUniversalSizeAmplification
        [Universal] Compacting for size amplification
      • kUniversalSizeRatio

        public static final CompactionReason kUniversalSizeRatio
        [Universal] Compacting for size ratio
      • kUniversalSortedRunNum

        public static final CompactionReason kUniversalSortedRunNum
        [Universal] number of sorted runs > level0_file_num_compaction_trigger
      • kFIFOMaxSize

        public static final CompactionReason kFIFOMaxSize
        [FIFO] total size > max_table_files_size
      • kFIFOReduceNumFiles

        public static final CompactionReason kFIFOReduceNumFiles
        [FIFO] reduce number of files.
      • kFIFOTtl

        public static final CompactionReason kFIFOTtl
        [FIFO] files with creation time < (current_time - interval)
      • kManualCompaction

        public static final CompactionReason kManualCompaction
        Manual compaction
      • kFilesMarkedForCompaction

        public static final CompactionReason kFilesMarkedForCompaction
        DB::SuggestCompactRange() marked files for compaction
      • kBottommostFiles

        public static final CompactionReason kBottommostFiles
        [Level] Automatic compaction within bottommost level to cleanup duplicate versions of same user key, usually due to a released snapshot.
      • kFlush

        public static final CompactionReason kFlush
        According to the comments in flush_job.cc, RocksDB treats flush as a level 0 compaction in internal stats.
      • kExternalSstIngestion

        public static final CompactionReason kExternalSstIngestion
        Compaction caused by external sst file ingestion
    • Method Detail

      • values

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

        public static CompactionReason 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