List of usage examples for com.google.common.cache CacheStats CacheStats
public CacheStats(long hitCount, long missCount, long loadSuccessCount, long loadExceptionCount, long totalLoadTime, long evictionCount)
From source file:ca.exprofesso.guava.jcache.GuavaCacheStatisticsMXBean.java
@Override public void clear() { CacheStats cacheStats = cache.unwrap(GuavaCache.class).stats(); snapshot = new CacheStats(cacheStats.hitCount(), cacheStats.missCount(), cacheStats.loadSuccessCount(), cacheStats.loadExceptionCount(), cacheStats.totalLoadTime(), cacheStats.evictionCount()); }
From source file:name.martingeisse.common.util.PassthroughCache.java
@Override public CacheStats stats() { return new CacheStats(0, 0, 0, 0, 0, 0); }
From source file:com.github.benmanes.caffeine.guava.CaffeinatedGuavaCache.java
@Override public CacheStats stats() { com.github.benmanes.caffeine.cache.stats.CacheStats stats = cache.stats(); return new CacheStats(stats.hitCount(), stats.missCount(), stats.loadSuccessCount(), stats.loadFailureCount(), stats.totalLoadTime(), stats.evictionCount()); }
From source file:org.locationtech.geogig.storage.cache.SharedCache.java
default CacheStats getStats() { return new CacheStats(0, 0, 0, 0, 0, 0); }
From source file:rickbw.incubator.cache.MultiCache.java
@Override public final CacheStats stats() { long hitCount = 0L; long missCount = 0L; long loadSuccessCount = 0L; long loadExceptionCount = 0L; long totalLoadTime = 0L; long evictionCount = 0L; for (final Cache<?, ?> delegate : this.delegates.values()) { final CacheStats stats = delegate.stats(); hitCount += stats.hitCount();/* ww w .j a va 2s. c o m*/ missCount += stats.missCount(); loadSuccessCount += stats.loadSuccessCount(); loadExceptionCount += stats.loadExceptionCount(); totalLoadTime += stats.totalLoadTime(); evictionCount += stats.evictionCount(); } return new CacheStats(hitCount, missCount, loadSuccessCount, loadExceptionCount, totalLoadTime, evictionCount); }
From source file:desmedt.frederik.cachebenchmarking.cache.CacheLIRS.java
@Override public CacheStats stats() { long hitCount = 0; long missCount = 0; long loadSuccessCount = 0; long loadExceptionCount = 0; long totalLoadTime = 0; long evictionCount = 0; for (Segment<K, V> s : segments) { hitCount += s.hitCount;/*www .j a v a 2 s . c o m*/ missCount += s.missCount; loadSuccessCount += s.loadSuccessCount; loadExceptionCount += s.loadExceptionCount; totalLoadTime += s.totalLoadTime; evictionCount += s.evictionCount; } CacheStats stats = new CacheStats(hitCount, missCount, loadSuccessCount, loadExceptionCount, totalLoadTime, evictionCount); return stats; }