Package org.rocksdb

Class CompactionOptions

    • Constructor Detail

      • CompactionOptions

        public CompactionOptions()
    • Method Detail

      • outputFileSizeLimit

        public long outputFileSizeLimit()
        Get the compaction output file size limit. See setOutputFileSizeLimit(long).
        Returns:
        the file size limit.
      • setOutputFileSizeLimit

        public CompactionOptions setOutputFileSizeLimit​(long outputFileSizeLimit)
        Compaction will create files of size outputFileSizeLimit(). Default: 2^64-1, which means that compaction will create a single file
        Parameters:
        outputFileSizeLimit - the size limit
        Returns:
        the instance of the current Options.
      • maxSubcompactions

        public int maxSubcompactions()
        Get the maximum number of threads that will concurrently perform a compaction job.
        Returns:
        the maximum number of threads.
      • setMaxSubcompactions

        public CompactionOptions setMaxSubcompactions​(int maxSubcompactions)
        This value represents the maximum number of threads that will concurrently perform a compaction job by breaking it into multiple, smaller ones that are run simultaneously. Default: 0 (i.e. no subcompactions) If > 0, it will replace the option in DBOptions.maxSubcompactions() for this compaction.
        Parameters:
        maxSubcompactions - The maximum number of threads that will concurrently perform a compaction job
        Returns:
        the instance of the current Options.