|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
It defines the commun methods associated to ReplacementManager implementations. Every Cache must have a ReplacementManager. The role of a ReplacementManager is to chose a set of objects to be evicted from the cache, whenever cache space is needed (e.g. to store a recently arrived object). Typical implementations for ReplacementManagers include LRU, MRU, FIFO based.
Method Summary | |
void |
addForReplacement(FixableCacheEntry entry)
|
void |
adjustForReplacement(FixableCacheEntry entry)
Called whenever an object has been accessed. |
int |
forceFree(int capacity)
It forces the replacement manager to free CacheEntry instances from the cahce. |
void |
removeForReplacement(java.lang.Object oid)
This method is called by the CacheManager in order to signal that an entry has been really evicted. |
Methods inherited from interface org.objectweb.perseus.cache.api.UnbindManager |
unbind, unbind, unbindAll, unbindUnfixed |
Method Detail |
public void addForReplacement(FixableCacheEntry entry) throws CacheException
entry
- The cache entry that has been accessed.
CacheException
- Whenever an internal error occurs.public void removeForReplacement(java.lang.Object oid)
oid
- is the evicted cache entrypublic void adjustForReplacement(FixableCacheEntry entry) throws CacheException
entry
- The cache entry that has been accessed.
CacheException
- Whenever an internal error occurs.public int forceFree(int capacity) throws CacheException
capacity
- is the quantity of space required by the cache.
CacheException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |