|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CacheStatisticsMBean
Method Summary | |
---|---|
void |
clearStatistics()
Clears the statistic counters to 0 for the associated Cache. |
java.lang.String |
getAssociatedCacheName()
|
long |
getCacheHits()
The number of times a requested item was found in the cache. |
long |
getCacheMisses()
|
long |
getInMemoryHits()
Number of times a requested item was found in the Memory Store. |
long |
getObjectCount()
Gets the number of elements stored in the cache. |
long |
getOnDiskHits()
Number of times a requested item was found in the Disk Store. |
int |
getStatisticsAccuracy()
Accurately measuring statistics can be expensive. |
java.lang.String |
getStatisticsAccuracyDescription()
Accurately measuring statistics can be expensive. |
Method Detail |
---|
void clearStatistics()
long getCacheHits()
long getInMemoryHits()
long getOnDiskHits()
long getCacheMisses()
long getObjectCount()
Statistics.STATISTICS_ACCURACY_BEST_EFFORT
.
The size is the number of Element
s in the MemoryStore
plus
the number of Element
s in the DiskStore
.
This number is the actual number of elements, including expired elements that have
not been removed. Any duplicates between stores are accounted for.
Expired elements are removed from the the memory store when
getting an expired element, or when attempting to spool an expired element to
disk.
Expired elements are removed from the disk store when getting an expired element,
or when the expiry thread runs, which is once every five minutes.
Statistics.STATISTICS_ACCURACY_GUARANTEED
.
This method accounts for elements which might be expired or duplicated between stores. It take approximately
200ms per 1000 elements to execute.
Statistics.STATISTICS_ACCURACY_NONE
.
The number given may contain expired elements. In addition if the DiskStore is used it may contain some double
counting of elements. It takes 6ms for 1000 elements to execute. Time to execute is O(log n). 50,000 elements take
36ms.
int getStatisticsAccuracy()
Statistics.STATISTICS_ACCURACY_BEST_EFFORT
,
Statistics.STATISTICS_ACCURACY_GUARANTEED
,
Statistics.STATISTICS_ACCURACY_NONE
java.lang.String getStatisticsAccuracyDescription()
java.lang.String getAssociatedCacheName()
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |