@Test public void testEmptyIntTree() { File directory = null; try { directory = makeTemporaryDirectory(); ByteStore externalStore = new ConcurrentByteStoreBDB(directory, "db"); NonConcurrentPageCache<Integer, DBIntValue> cache = new NonConcurrentPageCache.Builder<>(new SimpleIntKeyCoder(), externalStore, 25).build(); assertEquals(null, cache.get(Integer.MIN_VALUE)); assertEquals(null, cache.get(0)); assertEquals(null, cache.get(1)); assertEquals(null, cache.get(2)); cache.close(); } catch (IOException ex) { ex.printStackTrace(); fail(); } finally { if (directory != null) { if (!LessFiles.deleteDir(directory)) { fail(); } } } }
@Override public void close() { doClose(false, CloseOperation.NONE); }
NonConcurrentPageCache extends AbstractPageCache<K, V> { @Override public void close() { doClose(false, CloseOperation.NONE); } }
NonConcurrentPageCache extends AbstractPageCache<K, V> { @Override public void close() { doClose(false, CloseOperation.NONE); } NonConcurrentPageCache(KeyCoder<K, V> keyCoder, ByteStore externalStore, int maxPageSize,
                                  int maxPages, PageFactory<K, V> pageFactory); }
NonConcurrentPageCache extends AbstractPageCache<K, V> { @Override public void close() { doClose(false, CloseOperation.NONE); } NonConcurrentPageCache(KeyCoder<K, V> keyCoder, ByteStore externalStore, int maxPageSize,
                                  int maxPages, PageFactory<K, V> pageFactory); @Override V remove(K key); @Override void close(); @Override int close(boolean cleanLog, CloseOperation operation); }
NonConcurrentPageCache extends AbstractPageCache<K, V> { @Override public void close() { doClose(false, CloseOperation.NONE); } NonConcurrentPageCache(KeyCoder<K, V> keyCoder, ByteStore externalStore, int maxPageSize,
                                  int maxPages, PageFactory<K, V> pageFactory); @Override V remove(K key); @Override void close(); @Override int close(boolean cleanLog, CloseOperation operation);  }