|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Beta public static interface AbstractCache.StatsCounter
Accumulates statistics during the operation of a Cache for presentation by Cache.stats(). This is solely intended for consumption by Cache implementors.
| Method Summary | |
|---|---|
void |
recordConcurrentMiss()
Records a single concurrent miss. |
void |
recordEviction()
Records the eviction of an entry from the cache. |
void |
recordHit()
Records a single hit. |
void |
recordLoadException(long loadTime)
Records the failed load of a new entry. |
void |
recordLoadSuccess(long loadTime)
Records the successful load of a new entry. |
CacheStats |
snapshot()
Returns a snapshot of this counter's values. |
| Method Detail |
|---|
void recordHit()
void recordLoadSuccess(long loadTime)
recordConcurrentMiss(), this method should only be called by the loading thread.
loadTime - the number of nanoseconds the cache spent computing or retrieving the new
valuevoid recordLoadException(long loadTime)
recordConcurrentMiss(), this method should only be called by the loading thread.
loadTime - the number of nanoseconds the cache spent computing or retrieving the new
value prior to an exception being thrownvoid recordConcurrentMiss()
recordLoadSuccess(long)
and recordLoadException(long), this method should never be called by the loading
thread. Multiple concurrent calls to Cache lookup methods with the same key on an
absent value should result in a single call to either recordLoadSuccess or
recordLoadException and multiple calls to this method, despite all being served by
the results of a single load operation.
void recordEviction()
CacheStats snapshot()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||