Package org.eclipse.jetty.util.statistic
Class CounterStatistic
- java.lang.Object
-
- org.eclipse.jetty.util.statistic.CounterStatistic
-
@Deprecated(since="2021-05-27") public class CounterStatistic extends java.lang.ObjectDeprecated.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 CounterStatistic()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longadd(long delta)Deprecated.longdecrement()Deprecated.Decrements the value by one.longgetCurrent()Deprecated.longgetMax()Deprecated.longgetTotal()Deprecated.longincrement()Deprecated.Increments the value by one.voidreset()Deprecated.Resets the max and total to the current value.voidreset(long value)Deprecated.Resets the max, total and current value to the given parameter.java.lang.StringtoString()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
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-