mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-06 10:16:45 +00:00
[Java] Add compaction style to options
Summary: Add compression type to options make rocksdbjava make sample Reviewers: haobo, yhchiang, sdong, dhruba, rsumbaly, zzbennett, swapnilghike Reviewed By: yhchiang, sdong CC: leveldb Differential Revision: https://reviews.facebook.net/D20463
This commit is contained in:
@@ -1372,6 +1372,30 @@ public class Options extends RocksObject {
|
||||
return this;
|
||||
}
|
||||
private native void setCompressionType(long handle, byte compressionType);
|
||||
|
||||
/**
|
||||
* Compaction style for DB.
|
||||
*
|
||||
* @return Compaction style.
|
||||
*/
|
||||
public CompactionStyle compactionStyle() {
|
||||
return CompactionStyle.values()[compactionStyle(nativeHandle_)];
|
||||
}
|
||||
private native byte compactionStyle(long handle);
|
||||
|
||||
/**
|
||||
* Set compaction style for DB.
|
||||
*
|
||||
* Default: LEVEL.
|
||||
*
|
||||
* @param compactionStyle Compaction style.
|
||||
* @return the reference to the current option.
|
||||
*/
|
||||
public Options setCompactionStyle(CompactionStyle compactionStyle) {
|
||||
setCompactionStyle(nativeHandle_, compactionStyle.getValue());
|
||||
return this;
|
||||
}
|
||||
private native void setCompactionStyle(long handle, byte compactionStyle);
|
||||
|
||||
/**
|
||||
* If true, place whole keys in the filter (not just prefixes).
|
||||
|
||||
Reference in New Issue
Block a user