org.apache.gora.persistency
Class StatefulHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
org.apache.gora.persistency.StatefulHashMap<K,V>
- All Implemented Interfaces:
- Serializable, Cloneable, Map<K,V>, StatefulMap<K,V>
public class StatefulHashMap<K,V>
- extends HashMap<K,V>
- implements StatefulMap<K,V>
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
StatefulHashMap
public StatefulHashMap()
- Create an empty instance.
StatefulHashMap
public StatefulHashMap(Map<K,V> m)
- Create an instance with initial entries. These entries are added stateless;
in other words the statemap will be clear after the construction.
- Parameters:
m
- The map with initial entries.
put
public V put(K key,
V value)
- Specified by:
put
in interface Map<K,V>
- Overrides:
put
in class HashMap<K,V>
remove
public V remove(Object key)
- Specified by:
remove
in interface Map<K,V>
- Overrides:
remove
in class HashMap<K,V>
putAll
public void putAll(Map<? extends K,? extends V> m)
- Specified by:
putAll
in interface Map<K,V>
- Overrides:
putAll
in class HashMap<K,V>
clear
public void clear()
- Specified by:
clear
in interface Map<K,V>
- Overrides:
clear
in class HashMap<K,V>
getState
public State getState(K key)
- Specified by:
getState
in interface StatefulMap<K,V>
clearStates
public void clearStates()
- Specified by:
clearStates
in interface StatefulMap<K,V>
putState
public void putState(K key,
State state)
- Specified by:
putState
in interface StatefulMap<K,V>
states
public Map<K,State> states()
- Specified by:
states
in interface StatefulMap<K,V>
reuse
public void reuse()
- Description copied from interface:
StatefulMap
- Reuse will clear the map completely with states. This is different
from
Map.clear()
in that the latter only sets entries to deleted.
- Specified by:
reuse
in interface StatefulMap<K,V>
Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.