Class CounterStatistic


  • @Deprecated(since="2021-05-27")
    public class CounterStatistic
    extends Object
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.

    Statistics on a counter value.

    This class keeps the total, current and maximum value of a counter that can be incremented and decremented. The total refers only to increments.

    • Constructor Detail

      • CounterStatistic

        public CounterStatistic()
        Deprecated.
    • Method Detail

      • reset

        public void reset()
        Deprecated.
        Resets the max and total to the current value.
      • reset

        public void reset​(long value)
        Deprecated.
        Resets the max, total and current value to the given parameter.
        Parameters:
        value - the new current value
      • add

        public long add​(long delta)
        Deprecated.
        Parameters:
        delta - the amount to add to the counter
        Returns:
        the new counter value
      • increment

        public long increment()
        Deprecated.
        Increments the value by one.
        Returns:
        the new counter value after the increment
      • decrement

        public long decrement()
        Deprecated.
        Decrements the value by one.
        Returns:
        the new counter value after the decrement
      • getMax

        public long getMax()
        Deprecated.
        Returns:
        max counter value
      • getCurrent

        public long getCurrent()
        Deprecated.
        Returns:
        current counter value
      • getTotal

        public long getTotal()
        Deprecated.
        Returns:
        total counter value