org.apache.cocoon.components.store
Class MemoryStore
java.lang.Object
|
+--org.apache.cocoon.components.store.MemoryStore
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, Store, org.apache.avalon.framework.thread.ThreadSafe
- public class MemoryStore
- extends java.lang.Object
- implements Store, org.apache.avalon.framework.thread.ThreadSafe
- Version:
- CVS $Id: MemoryStore.java,v 1.6 2002/02/22 07:00:13 cziegeler Exp $
- Author:
- Federico Barbieri
(Betaversion Productions), Stefano Mazzocchi
(Apache Software Foundation), Pierpaolo Fumagalli
(Apache Software Foundation, Exoffice Technologies)
Method Summary |
boolean |
containsKey(java.lang.Object key)
Indicates if the given key is associated to a contained object. |
void |
free()
|
java.lang.Object |
get(java.lang.Object key)
Get the object associated to the given unique key. |
void |
hold(java.lang.Object key,
java.lang.Object value)
Holds the given object in a volatile state. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryStore
public MemoryStore()
get
public java.lang.Object get(java.lang.Object key)
- Get the object associated to the given unique key.
- Specified by:
get
in interface Store
store
public void store(java.lang.Object key,
java.lang.Object value)
- Store the given object in a persistent state. It is up to the
caller to ensure that the key has a persistent state across
different JVM executions.
- Specified by:
store
in interface Store
hold
public void hold(java.lang.Object key,
java.lang.Object value)
- Holds the given object in a volatile state. This means
the object store will discard held objects if the
virtual machine is restarted or some error happens.
- Specified by:
hold
in interface Store
remove
public void remove(java.lang.Object key)
- Remove the object associated to the given key.
- Specified by:
remove
in interface Store
free
public void free()
- Specified by:
free
in interface Store
containsKey
public boolean containsKey(java.lang.Object key)
- Indicates if the given key is associated to a contained object.
- Specified by:
containsKey
in interface Store
keys
public java.util.Enumeration keys()
- Returns the list of used keys as an Enumeration of Objects.
- Specified by:
keys
in interface Store
size
public int size()
- Returns count of the objects in the store, or -1 if could not be
obtained.
- Specified by:
size
in interface Store
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.