Package org.apache.cassandra.metrics
Class ChunkCacheMetrics
- java.lang.Object
-
- org.apache.cassandra.metrics.CacheMetrics
-
- org.apache.cassandra.metrics.ChunkCacheMetrics
-
- All Implemented Interfaces:
com.github.benmanes.caffeine.cache.stats.StatsCounter
public class ChunkCacheMetrics extends CacheMetrics implements com.github.benmanes.caffeine.cache.stats.StatsCounter
Metrics forICache
.
-
-
Field Summary
Fields Modifier and Type Field Description com.codahale.metrics.Timer
missLatency
Latency of misses-
Fields inherited from class org.apache.cassandra.metrics.CacheMetrics
capacity, entries, factory, fifteenMinuteHitRate, fiveMinuteHitRate, hitRate, hits, misses, oneMinuteHitRate, requests, size
-
-
Constructor Summary
Constructors Constructor Description ChunkCacheMetrics(ChunkCache cache)
Create metrics for the provided chunk cache.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
recordEviction(int weight, com.github.benmanes.caffeine.cache.RemovalCause cause)
void
recordHits(int count)
void
recordLoadFailure(long loadTime)
void
recordLoadSuccess(long loadTime)
void
recordMisses(int count)
com.github.benmanes.caffeine.cache.stats.CacheStats
snapshot()
-
Methods inherited from class org.apache.cassandra.metrics.CacheMetrics
reset
-
-
-
-
Constructor Detail
-
ChunkCacheMetrics
public ChunkCacheMetrics(ChunkCache cache)
Create metrics for the provided chunk cache.- Parameters:
cache
- Chunk cache to measure metrics
-
-
Method Detail
-
recordHits
public void recordHits(int count)
- Specified by:
recordHits
in interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
recordMisses
public void recordMisses(int count)
- Specified by:
recordMisses
in interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
recordLoadSuccess
public void recordLoadSuccess(long loadTime)
- Specified by:
recordLoadSuccess
in interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
recordLoadFailure
public void recordLoadFailure(long loadTime)
- Specified by:
recordLoadFailure
in interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
recordEviction
public void recordEviction(int weight, com.github.benmanes.caffeine.cache.RemovalCause cause)
- Specified by:
recordEviction
in interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
snapshot
@Nonnull public com.github.benmanes.caffeine.cache.stats.CacheStats snapshot()
- Specified by:
snapshot
in interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
-