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 StatisticsCollector
Returns a new statistics collector that will successfully count keys added to it.static StatisticsCollector
Returns a statistics collector that will ignore any statistics added to it, always returning an empty result forcounters()
.default void
incrementCounter
(String key) Adds 1 to the counter forkey
.void
incrementCounter
(String key, int count) Addscount
to the counter forkey
.
-
Method Details
-
incrementCounter
Adds 1 to the counter forkey
. -
incrementCounter
Addscount
to 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()
.
-