|
||||||||||
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.lru.LruCache
Class LruCache
Field Summary |
Fields inherited from class org.shiftone.cache.policy.AbstractPolicyCache |
SHRINK_DIV |
Constructor Summary | |
(package private) |
LruCache(java.lang.String name,
long timeoutMilliSeconds,
int maxSize)
|
(package private) |
LruCache(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()
|
(package private) java.lang.String |
dumpLruKeys()
|
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 node)
Update the node's value. |
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 |
LruCache(java.lang.String name, long timeoutMilliSeconds, int maxSize)
LruCache(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 void revalueNode(CacheNode node)
AbstractPolicyCache
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 dumpLruKeys()
java.lang.String dumpFifoKeys()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |