Class DataStoreStatusProvider.CacheStats
- java.lang.Object
- 
- com.launchdarkly.sdk.server.interfaces.DataStoreStatusProvider.CacheStats
 
- 
- Enclosing interface:
- DataStoreStatusProvider
 
 public static final class DataStoreStatusProvider.CacheStats extends java.lang.ObjectA snapshot of cache statistics. The statistics are cumulative across the lifetime of the data store.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. - Since:
- 4.12.0
- See Also:
- DataStoreStatusProvider.getCacheStats(),- PersistentDataStoreBuilder.recordCacheStats(boolean)
 
- 
- 
Constructor SummaryConstructors Constructor Description CacheStats(long hitCount, long missCount, long loadSuccessCount, long loadExceptionCount, long totalLoadTime, long evictionCount)Constructs a new instance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)longgetEvictionCount()The number of times cache entries have been evicted.longgetHitCount()The number of data queries that received cached data instead of going to the underlying data store.longgetLoadExceptionCount()The number of times that an error occurred while querying the underlying data store.longgetLoadSuccessCount()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).longgetMissCount()The number of data queries that did not find cached data and went to the underlying data store.longgetTotalLoadTime()The total number of nanoseconds that the cache has spent loading new values.inthashCode()java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
CacheStatspublic CacheStats(long hitCount, long missCount, long loadSuccessCount, long loadExceptionCount, long totalLoadTime, long evictionCount)Constructs a new instance.- Parameters:
- hitCount- number of queries that produced a cache hit
- missCount- number of queries that produced a cache miss
- loadSuccessCount- number of cache misses that loaded a value without an exception
- loadExceptionCount- number of cache misses that tried to load a value but got an exception
- totalLoadTime- number of nanoseconds spent loading new values
- evictionCount- number of cache entries that have been evicted
 
 
- 
 - 
Method Detail- 
getHitCountpublic long getHitCount() The number of data queries that received cached data instead of going to the underlying data store.- Returns:
- the number of cache hits
 
 - 
getMissCountpublic long getMissCount() The number of data queries that did not find cached data and went to the underlying data store.- Returns:
- the number of cache misses
 
 - 
getLoadSuccessCountpublic 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).- Returns:
- the number of successful loads
 
 - 
getLoadExceptionCountpublic long getLoadExceptionCount() The number of times that an error occurred while querying the underlying data store.- Returns:
- the number of failed loads
 
 - 
getTotalLoadTimepublic long getTotalLoadTime() The total number of nanoseconds that the cache has spent loading new values.- Returns:
- total time spent for all cache loads
 
 - 
getEvictionCountpublic long getEvictionCount() The number of times cache entries have been evicted.- Returns:
- the number of evictions
 
 - 
equalspublic boolean equals(java.lang.Object other) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-