Java Code Examples for org.rocksdb.Options#setAllowMmapReads()
The following examples show how to use
org.rocksdb.Options#setAllowMmapReads() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JRocksDB.java From snowblossom with Apache License 2.0 | 5 votes |
protected RocksDB openRocksDB(String path) throws Exception { Options options = new Options(); options.setIncreaseParallelism(16); options.setCreateIfMissing(true); options.setAllowMmapReads(true); options.setKeepLogFileNum(5); //options.setAllowMmapWrites(true); return RocksDB.open(options, path); }
Example 2
Source File: JRocksDB.java From jelectrum with MIT License | 5 votes |
public JRocksDB(Config config, EventLog log) throws Exception { super(config); this.log = log; config.require("rocksdb_path"); String path = config.get("rocksdb_path"); RocksDB.loadLibrary(); Options options = new Options(); options.setIncreaseParallelism(16); options.setCreateIfMissing(true); options.setAllowMmapReads(true); //options.setAllowMmapWrites(true); sharedWriteOptions = new WriteOptions(); sharedWriteOptions.setDisableWAL(true); sharedWriteOptions.setSync(false); db = RocksDB.open(options, path); open(); }