public class MemoryStore extends org.apache.avalon.framework.logger.AbstractLogEnabled implements Store, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.component.Component
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Hashtable |
m_table
The shared store
|
PERSISTENT_STORE, ROLE, TRANSIENT_STORE| Constructor and Description |
|---|
MemoryStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the Store of all elements
|
boolean |
containsKey(java.lang.Object key)
Indicates if the given key is associated to a contained object.
|
void |
free()
Try to free some used memory.
|
java.lang.Object |
get(java.lang.Object key)
Get the object associated to the given unique key.
|
java.util.Enumeration |
keys()
Returns the list of used keys as an Enumeration of Objects.
|
void |
remove(java.lang.Object key)
Remove the object associated to the given key.
|
int |
size()
Returns count of the objects in the store, or -1 if could not be
obtained.
|
void |
store(java.lang.Object key,
java.lang.Object value)
Store the given object in a persistent state.
|
public java.lang.Object get(java.lang.Object key)
public void store(java.lang.Object key,
java.lang.Object value)
public void remove(java.lang.Object key)
public void free()
Storepublic boolean containsKey(java.lang.Object key)
containsKey in interface Storepublic java.util.Enumeration keys()