private void openDB() { Options options = new Options(); options.createIfMissing(true); // options.compressionType(CompressionType.NONE); options.cacheSize(leveldbReadCache); options.writeBufferSize(leveldbWriteCache); options.maxOpenFiles(10000); // options.blockSize(1024*1024*50); try { db = factory.open(new File(filename), options); } catch (IOException e) { throw new RuntimeException("Can not open DB", e); } utxoCache = new LRUCache(openOutCache, 0.75f); try { if (batchGet(getKey(KeyType.CREATED)) == null) { createNewStore(params); } else { initFromDb(); } } catch (BlockStoreException e) { throw new RuntimeException("Can not init/load db", e); } }
private void openDB() { Options options = new Options(); options.createIfMissing(true); // options.compressionType(CompressionType.NONE); options.cacheSize(leveldbReadCache); options.writeBufferSize(leveldbWriteCache); options.maxOpenFiles(10000); // options.blockSize(1024*1024*50); try { db = factory.open(new File(filename), options); } catch (IOException e) { throw new RuntimeException("Can not open DB", e); } utxoCache = new LRUCache(openOutCache, 0.75f); try { if (batchGet(getKey(KeyType.CREATED)) == null) { createNewStore(params); } else { initFromDb(); } } catch (BlockStoreException e) { throw new RuntimeException("Can not init/load db", e); } }
private void openDB() { Options options = new Options(); options.createIfMissing(true); // options.compressionType(CompressionType.NONE); options.cacheSize(leveldbReadCache); options.writeBufferSize(leveldbWriteCache); options.maxOpenFiles(10000); // options.blockSize(1024*1024*50); try { db = factory.open(new File(filename), options); } catch (IOException e) { throw new RuntimeException("Can not open DB", e); } utxoCache = new LRUCache(openOutCache, 0.75f); try { if (batchGet(getKey(KeyType.CREATED)) == null) { createNewStore(params); } else { initFromDb(); } } catch (BlockStoreException e) { throw new RuntimeException("Can not init/load db", e); } }
private void openDB() { Options options = new Options(); options.createIfMissing(true); // options.compressionType(CompressionType.NONE); options.cacheSize(leveldbReadCache); options.writeBufferSize(leveldbWriteCache); options.maxOpenFiles(10000); // options.blockSize(1024*1024*50); try { db = factory.open(new File(filename), options); } catch (IOException e) { throw new RuntimeException("Can not open DB", e); } utxoCache = new LRUCache(openOutCache, 0.75f); try { if (batchGet(getKey(KeyType.CREATED)) == null) { createNewStore(params); } else { initFromDb(); } } catch (BlockStoreException e) { throw new RuntimeException("Can not init/load db", e); } }