Class IntMetricImpl

    • Constructor Detail

      • IntMetricImpl

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

      • add

        public void add​(int 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.
      • value

        public void value​(int val)
        Sets value.
        Parameters:
        val - Value.
      • reset

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

        public int value()
        Specified by:
        value in interface IntMetric
        Returns:
        Value of the metric.