|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.store.MRUMemoryStore
public final class MRUMemoryStore
This class provides a cache algorithm for the requested documents. It combines a HashMap and a LinkedList to create a so called MRU (Most Recently Used) cache.
This implementation is based on MRUBucketMap - map with efficient O(1) implementation of MRU removal policy.
TODO: Port improvments to the Excalibur implementation
Field Summary | |
---|---|
protected MRUBucketMap |
cache
Deprecated. |
Fields inherited from interface org.apache.cocoon.components.store.Store |
---|
PERSISTENT_CACHE, ROLE, TRANSIENT_CACHE |
Constructor Summary | |
---|---|
MRUMemoryStore()
Deprecated. |
Method Summary | |
---|---|
void |
compose(ComponentManager manager)
Deprecated. Get components of the ComponentManager |
boolean |
containsKey(Object key)
Deprecated. Indicates if the given key is associated to a contained object. |
void |
dispose()
Deprecated. Dispose the component |
void |
free()
Deprecated. Frees some of the fast memory used by this store. |
Object |
get(Object key)
Deprecated. Get the object associated to the given unique key. |
void |
hold(Object key,
Object value)
Deprecated. This method holds the requested object in a HashMap combined with a LinkedList to create the MRU. |
Enumeration |
keys()
Deprecated. Returns the list of used keys as an Enumeration. |
void |
parameterize(Parameters params)
Deprecated. Initialize the MRUMemoryStore. |
void |
remove(Object key)
Deprecated. Remove the object associated to the given key. |
int |
size()
Deprecated. Returns count of the objects in the store, or -1 if could not be obtained. |
void |
store(Object key,
Object value)
Deprecated. Store the given object in a persistent state. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected MRUBucketMap cache
Constructor Detail |
---|
public MRUMemoryStore()
Method Detail |
---|
public void compose(ComponentManager manager) throws ComponentException
compose
in interface Composable
manager
- The ComponentManager
ComponentException
public void parameterize(Parameters params) throws ParameterException
parameterize
in interface Parameterizable
params
- Store parameters
ParameterException
public void dispose()
dispose
in interface Disposable
public void store(Object key, Object value)
store
in interface Store
key
- The key for the object to storevalue
- The object to storepublic void hold(Object key, Object value)
hold
in interface Store
key
- The key of the object to be storedvalue
- The object to be storedpublic Object get(Object key)
get
in interface Store
key
- The key of the requested object
public void remove(Object key)
remove
in interface Store
key
- The key of to be removed objectpublic boolean containsKey(Object key)
containsKey
in interface Store
key
- The key of the object
public Enumeration keys()
keys
in interface Store
public int size()
size
in interface Store
public void free()
free
in interface Store
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |