Package org.rocksdb
Enum CompressionType
- java.lang.Object
-
- java.lang.Enum<CompressionType>
-
- org.rocksdb.CompressionType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CompressionType>
public enum CompressionType extends java.lang.Enum<CompressionType>
Enum CompressionTypeDB contents are stored in a set of blocks, each of which holds a sequence of key,value pairs. Each block may be compressed before being stored in a file. The following enum describes which compression method (if any) is used to compress a block.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BZLIB2_COMPRESSIONDISABLE_COMPRESSION_OPTIONLZ4_COMPRESSIONLZ4HC_COMPRESSIONNO_COMPRESSIONSNAPPY_COMPRESSIONXPRESS_COMPRESSIONZLIB_COMPRESSIONZSTD_COMPRESSION
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompressionTypegetCompressionType(byte byteIdentifier)Get the CompressionType enumeration value by passing the byte identifier to this method.static CompressionTypegetCompressionType(java.lang.String libraryName)Get the CompressionType enumeration value by passing the library name to this method.java.lang.StringgetLibraryName()Returns the library name of the compression type identified by the enumeration value.bytegetValue()Returns the byte value of the enumerations value.static CompressionTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static CompressionType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NO_COMPRESSION
public static final CompressionType NO_COMPRESSION
-
SNAPPY_COMPRESSION
public static final CompressionType SNAPPY_COMPRESSION
-
ZLIB_COMPRESSION
public static final CompressionType ZLIB_COMPRESSION
-
BZLIB2_COMPRESSION
public static final CompressionType BZLIB2_COMPRESSION
-
LZ4_COMPRESSION
public static final CompressionType LZ4_COMPRESSION
-
LZ4HC_COMPRESSION
public static final CompressionType LZ4HC_COMPRESSION
-
XPRESS_COMPRESSION
public static final CompressionType XPRESS_COMPRESSION
-
ZSTD_COMPRESSION
public static final CompressionType ZSTD_COMPRESSION
-
DISABLE_COMPRESSION_OPTION
public static final CompressionType DISABLE_COMPRESSION_OPTION
-
-
Method Detail
-
values
public static CompressionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CompressionType c : CompressionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CompressionType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getCompressionType
public static CompressionType getCompressionType(java.lang.String libraryName)
Get the CompressionType enumeration value by passing the library name to this method.
If library cannot be found the enumeration value
NO_COMPRESSIONwill be returned.- Parameters:
libraryName- compression library name.- Returns:
- CompressionType instance.
-
getCompressionType
public static CompressionType getCompressionType(byte byteIdentifier)
Get the CompressionType enumeration value by passing the byte identifier to this method.
- Parameters:
byteIdentifier- of CompressionType.- Returns:
- CompressionType instance.
- Throws:
java.lang.IllegalArgumentException- If CompressionType cannot be found for the provided byteIdentifier
-
getValue
public byte getValue()
Returns the byte value of the enumerations value.
- Returns:
- byte representation
-
getLibraryName
public java.lang.String getLibraryName()
Returns the library name of the compression type identified by the enumeration value.
- Returns:
- library name
-
-