Package org.rocksdb

Class CompactionOptionsFIFO

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class CompactionOptionsFIFO
    extends RocksObject
    Options for FIFO Compaction
    • Constructor Detail

      • CompactionOptionsFIFO

        public CompactionOptionsFIFO()
    • Method Detail

      • setMaxTableFilesSize

        public CompactionOptionsFIFO setMaxTableFilesSize​(long maxTableFilesSize)
        Once the total sum of table files reaches this, we will delete the oldest table file Default: 1GB
        Parameters:
        maxTableFilesSize - The maximum size of the table files
        Returns:
        the reference to the current options.
      • maxTableFilesSize

        public long maxTableFilesSize()
        Once the total sum of table files reaches this, we will delete the oldest table file Default: 1GB
        Returns:
        max table file size in bytes
      • setAllowCompaction

        public CompactionOptionsFIFO setAllowCompaction​(boolean allowCompaction)
        If true, try to do compaction to compact smaller files into larger ones. Minimum files to compact follows options.level0_file_num_compaction_trigger and compaction won't trigger if average compact bytes per del file is larger than options.write_buffer_size. This is to protect large files from being compacted again. Default: false
        Parameters:
        allowCompaction - true to allow intra-L0 compaction
        Returns:
        the reference to the current options.
      • allowCompaction

        public boolean allowCompaction()
        Check if intra-L0 compaction is enabled. When enabled, we try to compact smaller files into larger ones. See setAllowCompaction(boolean). Default: false
        Returns:
        true if intra-L0 compaction is enabled, false otherwise.