Class CaffeineStatsCounter

java.lang.Object
com.netflix.spinnaker.kork.telemetry.caffeine.CaffeineStatsCounter
All Implemented Interfaces:
com.github.benmanes.caffeine.cache.stats.StatsCounter

public class CaffeineStatsCounter extends Object implements com.github.benmanes.caffeine.cache.stats.StatsCounter
  • Constructor Details

    • CaffeineStatsCounter

      public CaffeineStatsCounter(com.netflix.spectator.api.Registry registry, String metricsPrefix)
      Constructs an instance for use by a single cache.
      Parameters:
      registry - the registry of metric instances
      metricsPrefix - the prefix name for the metrics
  • Method Details

    • recordHits

      public void recordHits(int count)
      Specified by:
      recordHits in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
    • recordMisses

      public void recordMisses(int count)
      Specified by:
      recordMisses in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
    • recordLoadSuccess

      public void recordLoadSuccess(long loadTime)
      Specified by:
      recordLoadSuccess in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
    • recordLoadFailure

      public void recordLoadFailure(long loadTime)
      Specified by:
      recordLoadFailure in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
    • recordEviction

      public void recordEviction()
      Specified by:
      recordEviction in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
    • recordEviction

      public void recordEviction(int weight)
      Specified by:
      recordEviction in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
    • snapshot

      public com.github.benmanes.caffeine.cache.stats.CacheStats snapshot()
      Specified by:
      snapshot in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
    • toString

      public String toString()
      Overrides:
      toString in class Object