|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.oscache.extra.CacheMapAccessEventListenerImpl
Implementation of a CacheMapAccessEventListener. It uses the events to count the cache hit and misses.
We are not using any synchronized so that this does not become a bottleneck. The consequence is that on retrieving values, the operations that are currently being done won't be counted.
Constructor Summary | |
CacheMapAccessEventListenerImpl()
Constructor, empty for us |
Method Summary | |
void |
accessed(CacheMapAccessEvent event)
This method handles an event each time the cache is accessed |
int |
getHitCount()
Returns the cache's current hit count |
int |
getMissCount()
Returns the cache's current miss count |
int |
getStaleHitCount()
Returns the cache's current stale hit count |
void |
reset()
Resets all of the totals to zero |
java.lang.String |
toString()
Return the counters in a string form |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CacheMapAccessEventListenerImpl()
Method Detail |
public int getHitCount()
public int getMissCount()
public int getStaleHitCount()
public void accessed(CacheMapAccessEvent event)
accessed
in interface CacheMapAccessEventListener
event
- The event triggered when the cache was accessedpublic void reset()
public java.lang.String toString()
|
See www.opensymphony.com for more information. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |