@Test public void twoStores_butSequentially() throws Exception { SPVBlockStore store = new SPVBlockStore(UNITTEST, blockStoreFile); store.close(); store = new SPVBlockStore(UNITTEST, blockStoreFile); }
@Override public void close() throws BlockStoreException { try { buffer.force(); buffer = null; blockCache.clear(); randomAccessFile.close(); } catch (IOException e) { throw new BlockStoreException(e); } }
SPVBlockStore implements BlockStore { @Override public void close() throws BlockStoreException { try { buffer.force(); buffer = null; blockCache.clear(); randomAccessFile.close(); } catch (IOException e) { throw new BlockStoreException(e); } } }
SPVBlockStore implements BlockStore { @Override public void close() throws BlockStoreException { try { buffer.force(); buffer = null; blockCache.clear(); randomAccessFile.close(); } catch (IOException e) { throw new BlockStoreException(e); } } SPVBlockStore(NetworkParameters params, File file); }
SPVBlockStore implements BlockStore { @Override public void close() throws BlockStoreException { try { buffer.force(); buffer = null; blockCache.clear(); randomAccessFile.close(); } catch (IOException e) { throw new BlockStoreException(e); } } SPVBlockStore(NetworkParameters params, File file); final int getFileSize(); @Override void put(StoredBlock block); @Override @Nullable StoredBlock get(Sha256Hash hash); @Override StoredBlock getChainHead(); @Override void setChainHead(StoredBlock chainHead); @Override void close(); @Override NetworkParameters getParams(); }
SPVBlockStore implements BlockStore { @Override public void close() throws BlockStoreException { try { buffer.force(); buffer = null; blockCache.clear(); randomAccessFile.close(); } catch (IOException e) { throw new BlockStoreException(e); } } SPVBlockStore(NetworkParameters params, File file); final int getFileSize(); @Override void put(StoredBlock block); @Override @Nullable StoredBlock get(Sha256Hash hash); @Override StoredBlock getChainHead(); @Override void setChainHead(StoredBlock chainHead); @Override void close(); @Override NetworkParameters getParams(); static final int DEFAULT_NUM_HEADERS; static final String HEADER_MAGIC; }