mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
[JAVA] Add java binding for Options.block_cache.
Summary: Add java bindings for Options.block_cache and allow DbBenchmark to set cache_size. Test Plan: make rocksdbjava make jtest make jdb_Bench Reviewers: haobo, sdong, ankgup87 Reviewed By: ankgup87 CC: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D17481
This commit is contained in:
@@ -56,13 +56,11 @@ public class RocksDBSample {
|
||||
assert(db == null);
|
||||
assert(false);
|
||||
}
|
||||
|
||||
// be sure to release the c++ pointer
|
||||
options.dispose();
|
||||
db.close();
|
||||
|
||||
try {
|
||||
db = RocksDB.open(db_path);
|
||||
db = RocksDB.open(options, db_path);
|
||||
db.put("hello".getBytes(), "world".getBytes());
|
||||
byte[] value = db.get("hello".getBytes());
|
||||
System.out.format("Get('hello') = %s\n",
|
||||
@@ -127,5 +125,7 @@ public class RocksDBSample {
|
||||
if (db != null) {
|
||||
db.close();
|
||||
}
|
||||
// be sure to dispose c++ pointer
|
||||
options.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user