Package org.rocksdb
Class CompactRangeOptions
java.lang.Object
org.rocksdb.AbstractNativeReference
org.rocksdb.AbstractImmutableNativeReference
org.rocksdb.RocksObject
org.rocksdb.CompactRangeOptions
- All Implemented Interfaces:
AutoCloseable
CompactRangeOptions is used by CompactRange() call. In the documentation of the methods "the compaction" refers to
any compaction that is using this CompactRangeOptions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic class -
Field Summary
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf true, compaction will execute immediately even if doing so would cause the DB to enter write stall mode.Returns the policy for compacting the bottommost levelbooleancanceled()booleanReturns whether compacted files will be moved to the minimum level capable of holding the data or given level (specified non-negative target_level).protected final voiddisposeInternal(long handle) booleanReturns whether the compaction is exclusive or other compactions may run concurrently at the same time.intIf > 0, it will replace the option in the DBOptions for this compactionsetAllowWriteStall(boolean allowWriteStall) If true, compaction will execute immediately even if doing so would cause the DB to enter write stall mode.setBottommostLevelCompaction(CompactRangeOptions.BottommostLevelCompaction bottommostLevelCompaction) Sets the policy for compacting the bottommost levelsetCanceled(boolean canceled) 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).setExclusiveManualCompaction(boolean exclusiveCompaction) Sets whether the compaction is exclusive or other compaction are allowed run concurrently at the same time.setMaxSubcompactions(int maxSubcompactions) If > 0, it will replace the option in the DBOptions for this compactionsetTargetLevel(int targetLevel) If change_level is true and target_level have non-negative value, compacted files will be moved to target_level.setTargetPathId(int targetPathId) Compaction outputs will be placed in options.db_paths[target_path_id].intIf change_level is true and target_level have non-negative value, compacted files will be moved to target_level.inttarget_path_id for compaction output.Methods inherited from class org.rocksdb.RocksObject
disposeInternal, getNativeHandleMethods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
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
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
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
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
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
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
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
If > 0, it will replace the option in the DBOptions for this compaction- Parameters:
maxSubcompactions- number of subcompactions- Returns:
- This CompactRangeOptions
-
setFullHistoryTSLow
-
fullHistoryTSLow
-
setCanceled
-
canceled
public boolean canceled() -
disposeInternal
protected final void disposeInternal(long handle) - Specified by:
disposeInternalin classRocksObject
-