Interface StatisticsCollector


public interface StatisticsCollector
A collector of counters keyed by strings.
  • Method Summary

    Modifier and Type Method Description
    com.google.common.collect.ImmutableMultiset<String> counters()
    Returns a copy of the counters in this statistics collector.
    static StatisticsCollector createCollector()
    Returns a new statistics collector that will successfully count keys added to it.
    static StatisticsCollector createNoOpCollector()
    Returns a statistics collector that will ignore any statistics added to it, always returning an empty result for counters().
    default void incrementCounter​(String key)
    Adds 1 to the counter for key.
    void incrementCounter​(String key, int count)
    Adds count to the counter for key.
  • Method Details

    • incrementCounter

      default void incrementCounter​(String key)
      Adds 1 to the counter for key.
    • incrementCounter

      void incrementCounter​(String key, int count)
      Adds count to the counter for key.
    • counters

      com.google.common.collect.ImmutableMultiset<String> counters()
      Returns a copy of the counters in this statistics collector.
    • createCollector

      static StatisticsCollector createCollector()
      Returns a new statistics collector that will successfully count keys added to it.
    • createNoOpCollector

      static StatisticsCollector createNoOpCollector()
      Returns a statistics collector that will ignore any statistics added to it, always returning an empty result for counters().