|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.shiftone.cache.decorator.stat.StatCache
Class StatCache
| Constructor Summary | |
StatCache(java.lang.String name,
Cache cache)
|
|
| Method Summary | |
void |
addObject(java.lang.Object key,
java.lang.Object cacheObject)
adds an object to the cache |
void |
clear()
Removes ALL keys and values from the cache. |
double |
getHitRatio()
Method getHitRatio is the ratio of hits to tries. |
java.lang.Object |
getObject(java.lang.Object key)
gets the value stored in the cache by it's key, or null if the key is not found. |
void |
printStats()
|
void |
remove(java.lang.Object key)
remove a specific key/value pair from the cache |
int |
size()
The number of key/value pares in the cache |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public StatCache(java.lang.String name,
Cache cache)
| Method Detail |
public void addObject(java.lang.Object key,
java.lang.Object cacheObject)
Cache
addObject in interface Cachepublic java.lang.Object getObject(java.lang.Object key)
Cache
getObject in interface Cachepublic void remove(java.lang.Object key)
Cache
remove in interface Cachepublic int size()
Cache
size in interface Cachepublic void clear()
Cache
clear in interface Cachepublic double getHitRatio()
public java.lang.String toString()
public void printStats()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||