public static final class DataStoreStatusProvider.CacheStats
extends java.lang.Object
This is based on the data provided by Guava's caching framework. The SDK currently uses Guava internally, but is not guaranteed to always do so, and to avoid embedding Guava API details in the SDK API this is provided as a separate class.
DataStoreStatusProvider.getCacheStats()
,
PersistentDataStoreBuilder.recordCacheStats(boolean)
Constructor and Description |
---|
CacheStats(long hitCount,
long missCount,
long loadSuccessCount,
long loadExceptionCount,
long totalLoadTime,
long evictionCount)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
long |
getEvictionCount()
The number of times cache entries have been evicted.
|
long |
getHitCount()
The number of data queries that received cached data instead of going to the underlying data store.
|
long |
getLoadExceptionCount()
The number of times that an error occurred while querying the underlying data store.
|
long |
getLoadSuccessCount()
The number of times a cache miss resulted in successfully loading a data store item (or finding
that it did not exist in the store).
|
long |
getMissCount()
The number of data queries that did not find cached data and went to the underlying data store.
|
long |
getTotalLoadTime()
The total number of nanoseconds that the cache has spent loading new values.
|
int |
hashCode() |
java.lang.String |
toString() |
public CacheStats(long hitCount, long missCount, long loadSuccessCount, long loadExceptionCount, long totalLoadTime, long evictionCount)
hitCount
- number of queries that produced a cache hitmissCount
- number of queries that produced a cache missloadSuccessCount
- number of cache misses that loaded a value without an exceptionloadExceptionCount
- number of cache misses that tried to load a value but got an exceptiontotalLoadTime
- number of nanoseconds spent loading new valuesevictionCount
- number of cache entries that have been evictedpublic long getHitCount()
public long getMissCount()
public long getLoadSuccessCount()
public long getLoadExceptionCount()
public long getTotalLoadTime()
public long getEvictionCount()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object