Interface StatisticsCollector
public interface StatisticsCollector
A collector of counters keyed by strings.
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableMultiset<String> counters()Returns a copy of the counters in this statistics collector.static StatisticsCollectorReturns a new statistics collector that will successfully count keys added to it.static StatisticsCollectorReturns a statistics collector that will ignore any statistics added to it, always returning an empty result forcounters().default voidincrementCounter(String key) Adds 1 to the counter forkey.voidincrementCounter(String key, int count) Addscountto the counter forkey.
-
Method Details
-
incrementCounter
Adds 1 to the counter forkey. -
incrementCounter
Addscountto the counter forkey. -
counters
com.google.common.collect.ImmutableMultiset<String> counters()Returns a copy of the counters in this statistics collector. -
createCollector
Returns a new statistics collector that will successfully count keys added to it. -
createNoOpCollector
Returns a statistics collector that will ignore any statistics added to it, always returning an empty result forcounters().
-