mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
[JNI] Each set function of Options / WriteOptions now returns its option instance.
Summary:
Make each set function of Options / WriteOptions return its option instance.
Java developers can now easier specify each option like the following:
options.setCreateIfMissing(true)
.setWriteBufferSize(8 * 1024)
.setMaxWriteBufferNumber(3)
.setDisableSeekCompaction(true)
.setBlockSize(64 * 1024)
.setMaxBackgroundCompactions(10);
Test Plan:
make rocksdbjava
make jtest
Reviewers: haobo, ankgup87, sdong, dhruba
Reviewed By: haobo
CC: leveldb
Differential Revision: https://reviews.facebook.net/D17661
This commit is contained in:
@@ -32,12 +32,12 @@ public class RocksDBSample {
|
||||
assert(db == null);
|
||||
}
|
||||
|
||||
options.setCreateIfMissing(true);
|
||||
options.setWriteBufferSize(8*1024);
|
||||
options.setMaxWriteBufferNumber(3);
|
||||
options.setDisableSeekCompaction(true);
|
||||
options.setBlockSize(64*1024);
|
||||
options.setMaxBackgroundCompactions(10);
|
||||
options.setCreateIfMissing(true)
|
||||
.setWriteBufferSize(8 * 1024)
|
||||
.setMaxWriteBufferNumber(3)
|
||||
.setDisableSeekCompaction(true)
|
||||
.setBlockSize(64 * 1024)
|
||||
.setMaxBackgroundCompactions(10);
|
||||
|
||||
assert(options.createIfMissing() == true);
|
||||
assert(options.writeBufferSize() == 8192);
|
||||
|
||||
Reference in New Issue
Block a user