|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CacheStatistics
Counts number of read/write requests and hit ratio for a cache in total and
per-class basis.
All methods with Class as input argument treats null as
java.lang.Object
. All per-class statistics depends on
determining the runtime type of the instance being cached. If it is not
possible to determine the runtime type from the given context, the statistics
is registered under generic java.lang.Object
.
Nested Class Summary | |
---|---|
static class |
CacheStatistics.Default
A default implementation. |
Method Summary | |
---|---|
long |
getHitCount()
Gets number of total read requests that has been found in cache since last reset. |
long |
getHitCount(Class c)
Gets number of total read requests that has been found in cache for the given class since last reset. |
long |
getReadCount()
Gets number of total read requests since last reset. |
long |
getReadCount(Class c)
Gets number of total read requests for the given class since last reset. |
long |
getTotalHitCount()
Gets number of total read requests that has been found in cache since start. |
long |
getTotalHitCount(Class c)
Gets number of total read requests that has been found in cache for the given class since start. |
long |
getTotalReadCount()
Gets number of total read requests since start. |
long |
getTotalReadCount(Class c)
Gets number of total read requests for the given class since start. |
long |
getTotalWriteCount()
Gets number of total write requests since start. |
long |
getTotalWriteCount(Class c)
Gets number of total write requests for the given class since start. |
long |
getWriteCount()
Gets number of total write requests since last reset. |
long |
getWriteCount(Class c)
Gets number of total write requests for the given class since last reset. |
boolean |
isEnabled()
Returns whether or not statistics will be collected. |
void |
reset()
Clears all accumulated statistics. |
Date |
since()
Gets the time of last reset. |
Date |
start()
Gets the time of start. |
Method Detail |
---|
long getReadCount()
long getHitCount()
long getWriteCount()
long getTotalReadCount()
long getTotalHitCount()
long getTotalWriteCount()
long getReadCount(Class c)
long getHitCount(Class c)
long getWriteCount(Class c)
long getTotalReadCount(Class c)
long getTotalHitCount(Class c)
long getTotalWriteCount(Class c)
Date since()
Date start()
void reset()
boolean isEnabled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |