public final class MetricsStatsCounter extends Object implements com.github.benmanes.caffeine.cache.stats.StatsCounter
StatsCounter instrumented with Dropwizard Metrics.| Constructor and Description |
|---|
MetricsStatsCounter(com.codahale.metrics.MetricRegistry registry,
String metricsPrefix)
Constructs an instance for use by a single cache.
|
| Modifier and Type | Method and Description |
|---|---|
void |
recordEviction()
Deprecated.
|
void |
recordEviction(int weight)
Deprecated.
|
void |
recordEviction(@NonNegative 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() |
String |
toString() |
public MetricsStatsCounter(com.codahale.metrics.MetricRegistry registry,
String metricsPrefix)
registry - the registry of metric instancesmetricsPrefix - the prefix name for the metricspublic void recordHits(int count)
recordHits in interface com.github.benmanes.caffeine.cache.stats.StatsCounterpublic void recordMisses(int count)
recordMisses in interface com.github.benmanes.caffeine.cache.stats.StatsCounterpublic void recordLoadSuccess(long loadTime)
recordLoadSuccess in interface com.github.benmanes.caffeine.cache.stats.StatsCounterpublic void recordLoadFailure(long loadTime)
recordLoadFailure in interface com.github.benmanes.caffeine.cache.stats.StatsCounter@Deprecated public void recordEviction()
recordEviction in interface com.github.benmanes.caffeine.cache.stats.StatsCounter@Deprecated public void recordEviction(int weight)
recordEviction in interface com.github.benmanes.caffeine.cache.stats.StatsCounterpublic void recordEviction(@NonNegative int weight,
com.github.benmanes.caffeine.cache.RemovalCause cause)
recordEviction in interface com.github.benmanes.caffeine.cache.stats.StatsCounterpublic com.github.benmanes.caffeine.cache.stats.CacheStats snapshot()
snapshot in interface com.github.benmanes.caffeine.cache.stats.StatsCounterCopyright © 2011. All rights reserved.