Package com.codahale.metrics.caffeine
Class MetricsStatsCounter
- java.lang.Object
-
- com.codahale.metrics.caffeine.MetricsStatsCounter
-
- All Implemented Interfaces:
com.github.benmanes.caffeine.cache.stats.StatsCounter
public final class MetricsStatsCounter extends Object implements com.github.benmanes.caffeine.cache.stats.StatsCounter
AStatsCounterinstrumented with Dropwizard Metrics.- Author:
- ben.manes@gmail.com (Ben Manes), John Karp
-
-
Constructor Summary
Constructors Constructor Description MetricsStatsCounter(com.codahale.metrics.MetricRegistry registry, String metricsPrefix)Constructs an instance for use by a single cache.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidrecordEviction()Deprecated.voidrecordEviction(@org.checkerframework.checker.index.qual.NonNegative int weight, com.github.benmanes.caffeine.cache.RemovalCause cause)voidrecordEviction(int weight)Deprecated.voidrecordHits(int count)voidrecordLoadFailure(long loadTime)voidrecordLoadSuccess(long loadTime)voidrecordMisses(int count)com.github.benmanes.caffeine.cache.stats.CacheStatssnapshot()StringtoString()
-
-
-
Constructor Detail
-
MetricsStatsCounter
public MetricsStatsCounter(com.codahale.metrics.MetricRegistry registry, String metricsPrefix)Constructs an instance for use by a single cache.- Parameters:
registry- the registry of metric instancesmetricsPrefix- the prefix name for the metrics
-
-
Method Detail
-
recordHits
public void recordHits(int count)
- Specified by:
recordHitsin interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
recordMisses
public void recordMisses(int count)
- Specified by:
recordMissesin interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
recordLoadSuccess
public void recordLoadSuccess(long loadTime)
- Specified by:
recordLoadSuccessin interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
recordLoadFailure
public void recordLoadFailure(long loadTime)
- Specified by:
recordLoadFailurein interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
recordEviction
@Deprecated public void recordEviction()
Deprecated.- Specified by:
recordEvictionin interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
recordEviction
@Deprecated public void recordEviction(int weight)
Deprecated.- Specified by:
recordEvictionin interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
recordEviction
public void recordEviction(@org.checkerframework.checker.index.qual.NonNegative int weight, com.github.benmanes.caffeine.cache.RemovalCause cause)- Specified by:
recordEvictionin interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
snapshot
public com.github.benmanes.caffeine.cache.stats.CacheStats snapshot()
- Specified by:
snapshotin interfacecom.github.benmanes.caffeine.cache.stats.StatsCounter
-
-