Class AbstractCache.SimpleStatsCounter

java.lang.Object
org.docx4j.com.google.common.cache.AbstractCache.SimpleStatsCounter
All Implemented Interfaces:
AbstractCache.StatsCounter
Enclosing class:
AbstractCache<K,​V>

public static final class AbstractCache.SimpleStatsCounter
extends java.lang.Object
implements AbstractCache.StatsCounter
A thread-safe AbstractCache.StatsCounter implementation for use by Cache implementors.
Since:
10.0
  • Constructor Summary

    Constructors 
    Constructor Description
    SimpleStatsCounter()
    Constructs an instance with all counts initialized to zero.
  • Method Summary

    Modifier and Type Method Description
    void incrementBy​(AbstractCache.StatsCounter other)
    Increments all counters by the values in other.
    void recordEviction()
    Records the eviction of an entry from the cache.
    void recordHits​(int count)
    Records cache hits.
    void recordLoadException​(long loadTime)
    Records the failed load of a new entry.
    void recordLoadSuccess​(long loadTime)
    Records the successful load of a new entry.
    void recordMisses​(int count)
    Records cache misses.
    CacheStats snapshot()
    Returns a snapshot of this counter's values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait