org.planx.util
Class PersistentMap<K,V>
java.lang.Object
org.planx.util.PersistentMap<K,V>
public class PersistentMap<K,V>
- extends Object
- Author:
- Kasper Bøgebjerg, Henning Niss, Thomas Ambus
PersistentMap
public PersistentMap(String filename,
Streamer<K> s1,
Streamer<V> s2)
throws IOException
- Throws:
IOException
PersistentMap
public PersistentMap(String filename,
Streamer<K> s1,
Streamer<V> s2,
boolean isSet)
throws IOException
- If
isSet is true the Map
will ignore values (saves space on disk).
- Throws:
IOException
close
public void close()
throws IOException
- Flushes all data to persistent storage and releases all resources.
Further method invocations are illegal.
- Throws:
IOException
get
public V get(K key)
put
public void put(K key,
V value)
throws IOException
- Throws:
IOException
replace
public void replace(V oldValue,
V newValue)
throws IOException
- Throws:
IOException
keySet
public Set<K> keySet()
entrySet
public Set<Map.Entry<K,V>> entrySet()
values
public Collection<V> values()
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2004-2005 Plan-X. All Rights Reserved.