org.rocksdb.CompactionStopStyle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alluxio-shaded-hadoop3-client Show documentation
Show all versions of alluxio-shaded-hadoop3-client Show documentation
Shaded Alluxio Client Module for hadoop 3
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
package alluxio.shaded.client.org.rocksdb;
/**
* Algorithm used to make a alluxio.shaded.client.com.action request stop picking new files
* into a single alluxio.shaded.client.com.action run
*/
public enum CompactionStopStyle {
/**
* Pick files of similar size
*/
CompactionStopStyleSimilarSize((byte)0x0),
/**
* Total size of picked files > next file
*/
CompactionStopStyleTotalSize((byte)0x1);
private final byte value;
CompactionStopStyle(final byte value) {
this.value = value;
}
/**
* Returns the byte value of the enumerations value
*
* @return byte representation
*/
public byte getValue() {
return value;
}
/**
* Get CompactionStopStyle by byte value.
*
* @param value byte representation of CompactionStopStyle.
*
* @return {@link alluxio.shaded.client.org.rocksdb.CompactionStopStyle} instance or null.
* @throws java.lang.IllegalArgumentException if an invalid
* value is provided.
*/
public static CompactionStopStyle getCompactionStopStyle(final byte value) {
for (final CompactionStopStyle alluxio.shaded.client.com.actionStopStyle :
CompactionStopStyle.values()) {
if (alluxio.shaded.client.com.actionStopStyle.getValue() == value){
return alluxio.shaded.client.com.actionStopStyle;
}
}
throw new IllegalArgumentException(
"Illegal value provided for CompactionStopStyle.");
}
}