Class AvgMinMaxPercentileCounterSet

  • All Implemented Interfaces:
    SummarySet

    public class AvgMinMaxPercentileCounterSet
    extends Metric
    implements SummarySet
    Generic set of long counters that keep track of min/max/avg for different keys. The counter is thread-safe
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String key, long value)
      Register a value.
      void addDataPoint​(java.lang.String key, long value)  
      void reset()  
      void resetMax()  
      java.util.Map<java.lang.String,​java.lang.Object> values()  
      • Methods inherited from class org.apache.zookeeper.server.metric.Metric

        add, add
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AvgMinMaxPercentileCounterSet

        public AvgMinMaxPercentileCounterSet​(java.lang.String name)
    • Method Detail

      • addDataPoint

        public void addDataPoint​(java.lang.String key,
                                 long value)
      • resetMax

        public void resetMax()
      • reset

        public void reset()
        Overrides:
        reset in class Metric
      • add

        public void add​(java.lang.String key,
                        long value)
        Description copied from interface: SummarySet
        Register a value.

        This method is thread safe, The MetricsProvider will take care of synchronization.

        Specified by:
        add in interface SummarySet
        Overrides:
        add in class Metric
        Parameters:
        key - the key to access the Summary for the given key
        value - current value
      • values

        public java.util.Map<java.lang.String,​java.lang.Object> values()
        Specified by:
        values in class Metric