Class CounterStatistic

java.lang.Object
org.eclipse.jetty.util.statistic.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 Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    add(long delta)
    Deprecated.
     
    long
    Deprecated.
    Decrements the value by one.
    long
    Deprecated.
     
    long
    Deprecated.
     
    long
    Deprecated.
     
    long
    Deprecated.
    Increments the value by one.
    void
    Deprecated.
    Resets the max and total to the current value.
    void
    reset(long value)
    Deprecated.
    Resets the max, total and current value to the given parameter.
    Deprecated.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CounterStatistic

      public CounterStatistic()
      Deprecated.
  • Method Details

    • 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
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object