@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(); blockCache.clear(); } 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(); blockCache.clear(); } 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(); blockCache.clear(); } catch (IOException e) { throw new BlockStoreException(e); } } SPVBlockStore(NetworkParameters params, File file);  SPVBlockStore(NetworkParameters params, File file, int capacity, boolean grow); }
SPVBlockStore implements BlockStore { @Override public void close() throws BlockStoreException { try { buffer.force(); buffer = null; blockCache.clear(); randomAccessFile.close(); blockCache.clear(); } catch (IOException e) { throw new BlockStoreException(e); } } SPVBlockStore(NetworkParameters params, File file);  SPVBlockStore(NetworkParameters params, File file, int capacity, boolean grow); static final int getFileSize(int capacity); @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(); @Nullable StoredBlock get(int blockHeight); }
SPVBlockStore implements BlockStore { @Override public void close() throws BlockStoreException { try { buffer.force(); buffer = null; blockCache.clear(); randomAccessFile.close(); blockCache.clear(); } catch (IOException e) { throw new BlockStoreException(e); } } SPVBlockStore(NetworkParameters params, File file);  SPVBlockStore(NetworkParameters params, File file, int capacity, boolean grow); static final int getFileSize(int capacity); @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(); @Nullable StoredBlock get(int blockHeight); static final int DEFAULT_CAPACITY; static final String HEADER_MAGIC; }