|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.shiftone.cache.policy.AbstractPolicyCache
org.shiftone.cache.policy.fifo.FifoCache
Class FifoCache
Field Summary |
Fields inherited from class org.shiftone.cache.policy.AbstractPolicyCache |
SHRINK_DIV |
Constructor Summary | |
(package private) |
FifoCache(java.lang.String name,
long timeoutMilliSeconds,
int maxSize)
|
(package private) |
FifoCache(java.lang.String name,
long timeoutMilliSeconds,
int maxSize,
EvictionListener evictionListener)
|
Method Summary | |
protected CacheNode |
createNode(java.lang.Object key,
java.lang.Object cacheObject)
Create a new node. |
protected void |
delete(CacheNode node)
Remove a node from the cache. |
(package private) java.lang.String |
dumpFifoKeys()
|
protected CacheNode |
findNodeByKey(java.lang.Object key)
Method findNodeByKey |
protected CacheNode |
getLeastValuableNode()
This method will execute the cache's onEviction strategy. |
void |
removeExpiredElements()
Method removeExpiredElements |
protected void |
revalueNode(CacheNode cacheNode)
DO NOTHING |
int |
size()
The number of key/value pares in the cache |
Methods inherited from class org.shiftone.cache.policy.AbstractPolicyCache |
addObject, clear, getMaxSize, getName, getObject, getTimeoutMilliSeconds, remove, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.shiftone.cache.Cache |
addObject, clear, getObject, remove |
Constructor Detail |
FifoCache(java.lang.String name, long timeoutMilliSeconds, int maxSize)
FifoCache(java.lang.String name, long timeoutMilliSeconds, int maxSize, EvictionListener evictionListener)
Method Detail |
protected CacheNode findNodeByKey(java.lang.Object key)
AbstractPolicyCache
findNodeByKey
in class AbstractPolicyCache
public int size()
Cache
size
in interface Cache
protected final void revalueNode(CacheNode cacheNode)
revalueNode
in class AbstractPolicyCache
protected void delete(CacheNode node)
AbstractPolicyCache
delete
in class AbstractPolicyCache
protected CacheNode getLeastValuableNode()
AbstractPolicyCache
This method is only called by shrinkToSize();
getLeastValuableNode
in class AbstractPolicyCache
public void removeExpiredElements()
ReapableCache
removeExpiredElements
in interface ReapableCache
removeExpiredElements
in class AbstractPolicyCache
protected CacheNode createNode(java.lang.Object key, java.lang.Object cacheObject)
AbstractPolicyCache
createNode
in class AbstractPolicyCache
java.lang.String dumpFifoKeys()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |