@ -14,6 +14,7 @@ public class CompactRangeOptions extends RocksObject {
private final static byte VALUE_kSkip = 0 ;
private final static byte VALUE_kSkip = 0 ;
private final static byte VALUE_kIfHaveCompactionFilter = 1 ;
private final static byte VALUE_kIfHaveCompactionFilter = 1 ;
private final static byte VALUE_kForce = 2 ;
private final static byte VALUE_kForce = 2 ;
private final static byte VALUE_kForceOptimized = 3 ;
// For level based compaction, we can configure if we want to skip/force bottommost level
// For level based compaction, we can configure if we want to skip/force bottommost level
// compaction. The order of this enum MUST follow the C++ layer. See BottommostLevelCompaction in
// compaction. The order of this enum MUST follow the C++ layer. See BottommostLevelCompaction in
@ -30,7 +31,12 @@ public class CompactRangeOptions extends RocksObject {
/ * *
/ * *
* Always compact bottommost level
* Always compact bottommost level
* /
* /
kForce ( VALUE_kForce ) ;
kForce ( VALUE_kForce ) ,
/ * *
* Always compact bottommost level but in bottommost level avoid
* double - compacting files created in the same compaction
* /
kForceOptimized ( VALUE_kForceOptimized ) ;
private final byte value ;
private final byte value ;
@ -57,6 +63,8 @@ public class CompactRangeOptions extends RocksObject {
case VALUE_kSkip : return kSkip ;
case VALUE_kSkip : return kSkip ;
case VALUE_kIfHaveCompactionFilter : return kIfHaveCompactionFilter ;
case VALUE_kIfHaveCompactionFilter : return kIfHaveCompactionFilter ;
case VALUE_kForce : return kForce ;
case VALUE_kForce : return kForce ;
case VALUE_kForceOptimized :
return kForceOptimized ;
default : return null ;
default : return null ;
}
}
}
}