4 * Algorithm used to make a compaction request stop picking new files
5 * into a single compaction run
7 public enum CompactionStopStyle
{
10 * Pick files of similar size
12 CompactionStopStyleSimilarSize((byte)0x0),
15 * Total size of picked files > next file
17 CompactionStopStyleTotalSize((byte)0x1);
20 private final byte value
;
22 CompactionStopStyle(final byte value
) {
27 * Returns the byte value of the enumerations value
29 * @return byte representation
31 public byte getValue() {
36 * Get CompactionStopStyle by byte value.
38 * @param value byte representation of CompactionStopStyle.
40 * @return {@link org.rocksdb.CompactionStopStyle} instance or null.
41 * @throws java.lang.IllegalArgumentException if an invalid
44 public static CompactionStopStyle
getCompactionStopStyle(final byte value
) {
45 for (final CompactionStopStyle compactionStopStyle
:
46 CompactionStopStyle
.values()) {
47 if (compactionStopStyle
.getValue() == value
){
48 return compactionStopStyle
;
51 throw new IllegalArgumentException(
52 "Illegal value provided for CompactionStopStyle.");