|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FarragoCacheVictimPolicy
FarragoCacheVictimPolicy defines the interface for different implementations of a cache victimization policy for the FarragoObjectCache. FarragoObjectCache calls the appropriate notification methods when entries are added, removed, or accessed from the cache, allowing the policy to determine the order in which entries should be victimized from the cache, when the cache becomes full.
Method Summary | |
---|---|
void |
accessEntry(FarragoCacheEntry entry)
Receives notification that an existing entry in the cache is being accessed. |
void |
clearCache()
Receives notification that all entries are being removed from the cache |
Iterator<FarragoCacheEntry> |
getVictimIterator()
Returns an iterator corresponding to a list of potential entries for removal from the cache, in the order of precedence. |
FarragoCacheEntry |
newEntry(FarragoObjectCache parentCache)
Creates a new cache entry |
void |
registerEntry(FarragoCacheEntry entry)
Receives notification that a new entry is being added to the cache. |
void |
unregisterEntry(FarragoCacheEntry entry)
Receives notification that an entry is being removed from the cache. |
void |
unregisterEntry(Iterator victimRange)
Unregisters the current entry being accessed from the victim range |
Method Detail |
---|
FarragoCacheEntry newEntry(FarragoObjectCache parentCache)
parentCache
- the cache this entry is associated withvoid registerEntry(FarragoCacheEntry entry)
entry
- new entry being added to the cachevoid unregisterEntry(FarragoCacheEntry entry)
entry
- entry to be removedvoid unregisterEntry(Iterator victimRange)
victimRange
- iterator corresponding to the victim rangevoid accessEntry(FarragoCacheEntry entry)
entry
- entry being accessedIterator<FarragoCacheEntry> getVictimIterator()
void clearCache()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |