Package org.rocksdb
Class CompactRangeOptions
- java.lang.Object
-
- org.rocksdb.AbstractNativeReference
-
- org.rocksdb.AbstractImmutableNativeReference
-
- org.rocksdb.RocksObject
-
- org.rocksdb.CompactRangeOptions
-
- All Implemented Interfaces:
java.lang.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCompactRangeOptions.BottommostLevelCompaction
-
Field Summary
-
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_
-
Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_
-
-
Constructor Summary
Constructors Constructor Description CompactRangeOptions()Construct CompactRangeOptions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowWriteStall()If true, compaction will execute immediately even if doing so would cause the DB to enter write stall mode.CompactRangeOptions.BottommostLevelCompactionbottommostLevelCompaction()Returns the policy for compacting the bottommost levelbooleanchangeLevel()Returns whether compacted files will be moved to the minimum level capable of holding the data or given level (specified non-negative target_level).protected voiddisposeInternal(long handle)booleanexclusiveManualCompaction()Returns whether the compaction is exclusive or other compactions may run concurrently at the same time.intmaxSubcompactions()If > 0, it will replace the option in the DBOptions for this compactionCompactRangeOptionssetAllowWriteStall(boolean allowWriteStall)If true, compaction will execute immediately even if doing so would cause the DB to enter write stall mode.CompactRangeOptionssetBottommostLevelCompaction(CompactRangeOptions.BottommostLevelCompaction bottommostLevelCompaction)Sets the policy for compacting the bottommost levelCompactRangeOptionssetChangeLevel(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).CompactRangeOptionssetExclusiveManualCompaction(boolean exclusiveCompaction)Sets whether the compaction is exclusive or other compaction are allowed run concurrently at the same time.CompactRangeOptionssetMaxSubcompactions(int maxSubcompactions)If > 0, it will replace the option in the DBOptions for this compactionCompactRangeOptionssetTargetLevel(int targetLevel)If change_level is true and target_level have non-negative value, compacted files will be moved to target_level.CompactRangeOptionssetTargetPathId(int targetPathId)Compaction outputs will be placed in options.db_paths[target_path_id].inttargetLevel()If change_level is true and target_level have non-negative value, compacted files will be moved to target_level.inttargetPathId()target_path_id for compaction output.-
Methods inherited from class org.rocksdb.RocksObject
disposeInternal, getNativeHandle
-
Methods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Methods inherited from class org.rocksdb.AbstractNativeReference
dispose, finalize
-
-
-
-
Method Detail
-
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
-
disposeInternal
protected final void disposeInternal(long handle)
- Specified by:
disposeInternalin classRocksObject
-
-