Package org.rocksdb
Enum Class CompressionType
- All Implemented Interfaces:
Serializable,Comparable<CompressionType>,Constable
Enum CompressionType
DB 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic CompressionTypegetCompressionType(byte byteIdentifier) Get the CompressionType enumeration value by passing the byte identifier to this method.static CompressionTypegetCompressionType(String libraryName) Get the CompressionType enumeration value by passing the library name to this method.Returns the library name of the compression type identified by the enumeration value.bytegetValue()Returns the byte value of the enumerations value.static CompressionTypeReturns the enum constant of this class with the specified name.static CompressionType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_COMPRESSION
-
SNAPPY_COMPRESSION
-
ZLIB_COMPRESSION
-
BZLIB2_COMPRESSION
-
LZ4_COMPRESSION
-
LZ4HC_COMPRESSION
-
XPRESS_COMPRESSION
-
ZSTD_COMPRESSION
-
DISABLE_COMPRESSION_OPTION
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getCompressionType
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
Get the CompressionType enumeration value by passing the byte identifier to this method.
- Parameters:
byteIdentifier- of CompressionType.- Returns:
- CompressionType instance.
- Throws:
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
Returns the library name of the compression type identified by the enumeration value.
- Returns:
- library name
-