Interface CacheStatistics


public interface CacheStatistics
Cache statistics for a RedisCache.
NOTE: CacheStatistics only serve local (in memory) data and do not collect any server statistics.
Since:
2.4
Author:
Mark Paluch, Christoph Strobl
  • Method Details

    • getCacheName

      String getCacheName()
      Returns:
      the name of the RedisCache.
    • getPuts

      long getPuts()
      Returns:
      number of put operations on the cache.
    • getGets

      long getGets()
      Returns:
      the total number of get operations including both hits and misses.
    • getHits

      long getHits()
      Returns:
      the number of cache get hits.
    • getMisses

      long getMisses()
      Returns:
      number of cache get misses.
    • getPending

      default long getPending()
      Returns:
      the number of gets that have not yet been answered (neither hit nor miss).
    • getDeletes

      long getDeletes()
      Returns:
      number of cache removals.
    • getLockWaitDuration

      long getLockWaitDuration(TimeUnit unit)
      Parameters:
      unit - the time unit to report the lock wait duration.
      Returns:
      lock duration using the given TimeUnit if the cache is configured to use locking.
    • getSince

      Instant getSince()
      Returns:
      initial point in time when started statistics capturing.
    • getLastReset

      Instant getLastReset()
      Returns:
      instantaneous point in time of last statistics counter reset. Equals getSince() if never reset.
    • getTime

      default Instant getTime()
      Returns:
      the statistics time.