Interface WindowCache.StatsRecorder

All Known Implementing Classes:
WindowCache.StatsRecorderImpl
Enclosing class:
WindowCache

static interface WindowCache.StatsRecorder
Record statistics for a cache
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a snapshot of this recorder's stats.
    void
    recordEvictions(int count)
    Record cache evictions due to the cache evictions strategy
    void
    recordHits(int count)
    Record cache hits.
    void
    recordLoadFailure(long loadTimeNanos)
    Record a failed load of a cache entry
    void
    recordLoadSuccess(long loadTimeNanos)
    Record a successful load of a cache entry
    void
    recordMisses(int count)
    Record cache misses.
    void
    recordOpenBytes(Pack pack, int delta)
    Record cached bytes
    void
    recordOpenFiles(int delta)
    Record files opened by cache
  • Method Details

    • recordHits

      void recordHits(int count)
      Record cache hits. Called when cache returns a cached entry.
      Parameters:
      count - number of cache hits to record
    • recordMisses

      void recordMisses(int count)
      Record cache misses. Called when the cache returns an entry which had to be loaded.
      Parameters:
      count - number of cache misses to record
    • recordLoadSuccess

      void recordLoadSuccess(long loadTimeNanos)
      Record a successful load of a cache entry
      Parameters:
      loadTimeNanos - time to load a cache entry
    • recordLoadFailure

      void recordLoadFailure(long loadTimeNanos)
      Record a failed load of a cache entry
      Parameters:
      loadTimeNanos - time used trying to load a cache entry
    • recordEvictions

      void recordEvictions(int count)
      Record cache evictions due to the cache evictions strategy
      Parameters:
      count - number of evictions to record
    • recordOpenFiles

      void recordOpenFiles(int delta)
      Record files opened by cache
      Parameters:
      delta - delta of number of files opened by cache
    • recordOpenBytes

      void recordOpenBytes(Pack pack, int delta)
      Record cached bytes
      Parameters:
      pack - pack file the bytes are read from
      delta - delta of cached bytes
    • getStats

      Returns a snapshot of this recorder's stats. Note that this may be an inconsistent view, as it may be interleaved with update operations.
      Returns:
      a snapshot of this recorder's stats