public class CacheStats extends Object implements CacheStatsMXBean
CacheStatsMXBean
interface.Constructor and Description |
---|
CacheStats(long cacheSize,
long hitCount,
long missCount,
long loadSuccessCount,
long loadExceptionCount,
long totalLoadTime,
long evictionCount) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
long |
getCacheSize() |
long |
getEvictionCount()
Returns the number of times an entry has been evicted.
|
long |
getHitCount()
Returns the number of times
Cache lookup methods have returned a cached value. |
long |
getLoadExceptionCount()
Returns the number of times
Cache lookup methods threw an exception while loading
a new value. |
long |
getLoadSuccessCount()
Returns the number of times
Cache lookup methods have successfully loaded a new
value. |
long |
getMissCount()
Returns the number of times
Cache lookup methods have returned an uncached (newly
loaded) value, or null. |
long |
getTotalLoadTime()
Returns the total number of nanoseconds the cache has spent loading new values.
|
int |
hashCode() |
String |
toString() |
public CacheStats(long cacheSize, long hitCount, long missCount, long loadSuccessCount, long loadExceptionCount, long totalLoadTime, long evictionCount)
public long getCacheSize()
public long getHitCount()
CacheStatsMXBean
Cache
lookup methods have returned a cached value.getHitCount
in interface CacheStatsMXBean
CacheStats.hitCount()
public long getMissCount()
CacheStatsMXBean
Cache
lookup methods have returned an uncached (newly
loaded) value, or null. Multiple concurrent calls to Cache
lookup methods on an
absent value can result in multiple misses, all returning the results of a single cache load operation.getMissCount
in interface CacheStatsMXBean
CacheStats.missCount()
public long getLoadSuccessCount()
CacheStatsMXBean
Cache
lookup methods have successfully loaded a new
value. This is usually incremented in conjunction with CacheStatsMXBean.getMissCount()
, though getMissCount
is
also incremented when an exception is encountered during cache loading (see CacheStatsMXBean.getLoadExceptionCount()
).
Multiple concurrent misses for the same key will result in a single load operation. This may be incremented not
in conjunction with getMissCount
if the load occurs as a result of a refresh or if the cache loader
returned more items than was requested. getMissCount
may also be incremented not in conjunction with this
(nor CacheStatsMXBean.getLoadExceptionCount()
) on calls to getIfPresent
.getLoadSuccessCount
in interface CacheStatsMXBean
CacheStats.loadSuccessCount()
public long getLoadExceptionCount()
CacheStatsMXBean
Cache
lookup methods threw an exception while loading
a new value. This is usually incremented in conjunction with getMissCount
, though getMissCount
is
also incremented when cache loading completes successfully (see CacheStatsMXBean.getLoadSuccessCount()
). Multiple
concurrent misses for the same key will result in a single load operation. This may be incremented not in
conjunction with getMissCount
if the load occurs as a result of a refresh or if the cache loader returned
more items than was requested. getMissCount
may also be incremented not in conjunction with this (nor
CacheStatsMXBean.getLoadSuccessCount()
) on calls to getIfPresent
.getLoadExceptionCount
in interface CacheStatsMXBean
CacheStats.loadExceptionCount()
public long getTotalLoadTime()
CacheStatsMXBean
getLoadSuccessCount
or getLoadExceptionCount
is
incremented.getTotalLoadTime
in interface CacheStatsMXBean
CacheStats.totalLoadTime()
public long getEvictionCount()
CacheStatsMXBean
getEvictionCount
in interface CacheStatsMXBean
CacheStats.evictionCount()
Copyright © 2018 SAP SE. All rights reserved.