mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-05 17:56:49 +00:00
Change enum type from int to byte
This commit is contained in:
@@ -6,20 +6,20 @@
|
||||
package org.rocksdb;
|
||||
|
||||
public enum CompressionType {
|
||||
NO_COMPRESSION(0),
|
||||
SNAPPY_COMPRESSION(1),
|
||||
ZLIB_COMPRESSION(2),
|
||||
BZLIB2_COMPRESSION(3),
|
||||
LZ4_COMPRESSION(4),
|
||||
LZ4HC_COMPRESSION(5);
|
||||
NO_COMPRESSION((byte) 0),
|
||||
SNAPPY_COMPRESSION((byte) 1),
|
||||
ZLIB_COMPRESSION((byte) 2),
|
||||
BZLIB2_COMPRESSION((byte) 3),
|
||||
LZ4_COMPRESSION((byte) 4),
|
||||
LZ4HC_COMPRESSION((byte) 5);
|
||||
|
||||
private final int value_;
|
||||
private final byte value_;
|
||||
|
||||
private CompressionType(int value) {
|
||||
private CompressionType(byte value) {
|
||||
value_ = value;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
public byte getValue() {
|
||||
return value_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1328,7 +1328,7 @@ public class Options extends RocksObject {
|
||||
public CompressionType compressionType() {
|
||||
return CompressionType.values()[compressionType(nativeHandle_)];
|
||||
}
|
||||
private native int compressionType(long handle);
|
||||
private native byte compressionType(long handle);
|
||||
|
||||
/**
|
||||
* Compress blocks using the specified compression algorithm. This
|
||||
@@ -1352,7 +1352,7 @@ public class Options extends RocksObject {
|
||||
setCompressionType(nativeHandle_, compressionType.getValue());
|
||||
return this;
|
||||
}
|
||||
private native void setCompressionType(long handle, int compressionType);
|
||||
private native void setCompressionType(long handle, byte compressionType);
|
||||
|
||||
/**
|
||||
* If true, place whole keys in the filter (not just prefixes).
|
||||
|
||||
Reference in New Issue
Block a user