Class LongAdderMetric

    • Constructor Detail

      • LongAdderMetric

        public LongAdderMetric​(String name,
                               @Nullable
                               @Nullable String desc)
        Parameters:
        name - Name.
        desc - Description.
    • Method Detail

      • add

        public void add​(long x)
        Adds x to the metric.
        Parameters:
        x - Value to be added.
      • increment

        public void increment()
        Adds 1 to the metric.
      • decrement

        public void decrement()
        Adds -1 to the metric.
      • reset

        public void reset()
        Resets metric state.
        Specified by:
        reset in interface Metric
      • value

        public long value()
        Specified by:
        value in interface LongMetric
        Returns:
        Value of the metric.