Interface CacheStatisticsCollector

All Superinterfaces:
CacheStatisticsProvider

public interface CacheStatisticsCollector extends CacheStatisticsProvider
The statistics collector supports capturing of relevant RedisCache operations such as hits & misses.
Since:
2.4
Author:
Christoph Strobl
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default void
    incDeletes(String cacheName)
    Increase the counter for delete operations of the given cache.
    void
    incDeletesBy(String cacheName, int value)
    Increase the counter for delete operations of the given cache by the given value.
    void
    incGets(String cacheName)
    Increase the counter for get operations of the given cache.
    void
    incHits(String cacheName)
    Increase the counter for get operations with result of the given cache.
    void
    incLockTime(String cacheName, long durationNS)
    Increase the gauge for sync lock duration of the cache by the given nanoseconds.
    void
    incMisses(String cacheName)
    Increase the counter for get operations without result of the given cache.
    void
    incPuts(String cacheName)
    Increase the counter for put operations of the given cache.
     
    void
    reset(String cacheName)
    Reset the all counters and gauges of for the given cache.

    Methods inherited from interface org.springframework.data.redis.cache.CacheStatisticsProvider

    getCacheStatistics
  • Method Details

    • incPuts

      void incPuts(String cacheName)
      Increase the counter for put operations of the given cache.
      Parameters:
      cacheName - must not be null.
    • incGets

      void incGets(String cacheName)
      Increase the counter for get operations of the given cache.
      Parameters:
      cacheName - must not be null.
    • incHits

      void incHits(String cacheName)
      Increase the counter for get operations with result of the given cache.
      Parameters:
      cacheName - must not be null.
    • incMisses

      void incMisses(String cacheName)
      Increase the counter for get operations without result of the given cache.
      Parameters:
      cacheName - must not be null.
    • incDeletes

      default void incDeletes(String cacheName)
      Increase the counter for delete operations of the given cache.
      Parameters:
      cacheName - must not be null.
    • incDeletesBy

      void incDeletesBy(String cacheName, int value)
      Increase the counter for delete operations of the given cache by the given value.
      Parameters:
      cacheName - must not be null.
    • incLockTime

      void incLockTime(String cacheName, long durationNS)
      Increase the gauge for sync lock duration of the cache by the given nanoseconds.
      Parameters:
      cacheName - must not be null.
    • reset

      void reset(String cacheName)
      Reset the all counters and gauges of for the given cache.
      Parameters:
      cacheName - must not be null.
    • none

      static CacheStatisticsCollector none()
      Returns:
      a CacheStatisticsCollector that performs no action.
    • create

      static CacheStatisticsCollector create()
      Returns:
      a default CacheStatisticsCollector implementation.