Class AtomicLongMetric

    • Constructor Detail

      • AtomicLongMetric

        public AtomicLongMetric​(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.
      • value

        public void value​(long val)
        Sets value.
        Parameters:
        val - Value.