@Test public void testFlush() throws IOException { File sharedFile = File.createTempFile("shared", "j81"); sharedFile.deleteOnExit(); PersistentMap writer = new PersistentMap(sharedFile); NullValueCallback callback = new NullValueCallback(); Bufferlo data = new Bufferlo(); GlazedListsIO.serializableByteCoder().encode(new long[4000], data.getOutputStream()); for(int i = 0; i < 50; i++) { Chunk chunk = new Chunk(data); writer.put("big data", chunk); chunk.fetchValue(callback);; } String tokenKey = "Saskatchewan"; String tokenValue = "Roughriders"; writer.put(tokenKey, chunkify(tokenValue)); writer.flush(); PersistentMap reader = new PersistentMap(sharedFile); Chunk chunk = (Chunk)reader.get(tokenKey); Object tokenValuePersisted = (chunk == null) ? null : deChunkify(chunk); assertEquals(tokenValue, tokenValuePersisted); reader.close(); writer.close(); }
public void flush() { nioDaemon.invokeAndWait(NoOp.instance()); }
PersistentMap implements Map { public void flush() { nioDaemon.invokeAndWait(NoOp.instance()); } }
PersistentMap implements Map { public void flush() { nioDaemon.invokeAndWait(NoOp.instance()); } PersistentMap(File file);  PersistentMap(File file, ByteCoder keyCoder); }
PersistentMap implements Map { public void flush() { nioDaemon.invokeAndWait(NoOp.instance()); } PersistentMap(File file);  PersistentMap(File file, ByteCoder keyCoder); void close(); void flush(); @Override void clear(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override Set entrySet(); @Override Object put(Object key, Object value); @Override Object get(Object key); @Override Object remove(Object key); @Override Set keySet(); @Override Collection values(); @Override boolean isEmpty(); @Override void putAll(Map m); @Override int size(); }
PersistentMap implements Map { public void flush() { nioDaemon.invokeAndWait(NoOp.instance()); } PersistentMap(File file);  PersistentMap(File file, ByteCoder keyCoder); void close(); void flush(); @Override void clear(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override Set entrySet(); @Override Object put(Object key, Object value); @Override Object get(Object key); @Override Object remove(Object key); @Override Set keySet(); @Override Collection values(); @Override boolean isEmpty(); @Override void putAll(Map m); @Override int size();  }