Package org.rocksdb

Class CompactRangeOptions

All Implemented Interfaces:
AutoCloseable

public class CompactRangeOptions extends RocksObject
CompactRangeOptions is used by CompactRange() call. In the documentation of the methods "the compaction" refers to any compaction that is using this CompactRangeOptions.
  • Constructor Details

    • CompactRangeOptions

      public CompactRangeOptions()
      Construct CompactRangeOptions.
  • Method Details

    • exclusiveManualCompaction

      public boolean exclusiveManualCompaction()
      Returns whether the compaction is exclusive or other compactions may run concurrently at the same time.
      Returns:
      true if exclusive, false if concurrent
    • setExclusiveManualCompaction

      public CompactRangeOptions setExclusiveManualCompaction(boolean exclusiveCompaction)
      Sets whether the compaction is exclusive or other compaction are allowed run concurrently at the same time.
      Parameters:
      exclusiveCompaction - true if compaction should be exclusive
      Returns:
      This CompactRangeOptions
    • changeLevel

      public boolean changeLevel()
      Returns whether compacted files will be moved to the minimum level capable of holding the data or given level (specified non-negative target_level).
      Returns:
      true, if compacted files will be moved to the minimum level
    • setChangeLevel

      public CompactRangeOptions setChangeLevel(boolean changeLevel)
      Whether compacted files will be moved to the minimum level capable of holding the data or given level (specified non-negative target_level).
      Parameters:
      changeLevel - If true, compacted files will be moved to the minimum level
      Returns:
      This CompactRangeOptions
    • targetLevel

      public int targetLevel()
      If change_level is true and target_level have non-negative value, compacted files will be moved to target_level.
      Returns:
      The target level for the compacted files
    • setTargetLevel

      public CompactRangeOptions setTargetLevel(int targetLevel)
      If change_level is true and target_level have non-negative value, compacted files will be moved to target_level.
      Parameters:
      targetLevel - target level for the compacted files
      Returns:
      This CompactRangeOptions
    • targetPathId

      public int targetPathId()
      target_path_id for compaction output. Compaction outputs will be placed in options.db_paths[target_path_id].
      Returns:
      target_path_id
    • setTargetPathId

      public CompactRangeOptions setTargetPathId(int targetPathId)
      Compaction outputs will be placed in options.db_paths[target_path_id]. Behavior is undefined if target_path_id is out of range.
      Parameters:
      targetPathId - target path id
      Returns:
      This CompactRangeOptions
    • bottommostLevelCompaction

      public CompactRangeOptions.BottommostLevelCompaction bottommostLevelCompaction()
      Returns the policy for compacting the bottommost level
      Returns:
      The BottommostLevelCompaction policy
    • setBottommostLevelCompaction

      public CompactRangeOptions setBottommostLevelCompaction(CompactRangeOptions.BottommostLevelCompaction bottommostLevelCompaction)
      Sets the policy for compacting the bottommost level
      Parameters:
      bottommostLevelCompaction - The policy for compacting the bottommost level
      Returns:
      This CompactRangeOptions
    • allowWriteStall

      public boolean allowWriteStall()
      If true, compaction will execute immediately even if doing so would cause the DB to enter write stall mode. Otherwise, it'll sleep until load is low enough.
      Returns:
      true if compaction will execute immediately
    • setAllowWriteStall

      public CompactRangeOptions setAllowWriteStall(boolean allowWriteStall)
      If true, compaction will execute immediately even if doing so would cause the DB to enter write stall mode. Otherwise, it'll sleep until load is low enough.
      Parameters:
      allowWriteStall - true if compaction should execute immediately
      Returns:
      This CompactRangeOptions
    • maxSubcompactions

      public int maxSubcompactions()
      If > 0, it will replace the option in the DBOptions for this compaction
      Returns:
      number of subcompactions
    • setMaxSubcompactions

      public CompactRangeOptions setMaxSubcompactions(int maxSubcompactions)
      If > 0, it will replace the option in the DBOptions for this compaction
      Parameters:
      maxSubcompactions - number of subcompactions
      Returns:
      This CompactRangeOptions
    • setFullHistoryTSLow

      public CompactRangeOptions setFullHistoryTSLow(CompactRangeOptions.Timestamp tsLow)
    • fullHistoryTSLow

      public CompactRangeOptions.Timestamp fullHistoryTSLow()
    • setCanceled

      public CompactRangeOptions setCanceled(boolean canceled)
    • canceled

      public boolean canceled()
    • disposeInternal

      protected final void disposeInternal(long handle)
      Specified by:
      disposeInternal in class RocksObject