Package org.eclipse.jetty.util.statistic
Class CounterStatistic
java.lang.Object
org.eclipse.jetty.util.statistic.CounterStatistic
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 -
Method Summary
Modifier and TypeMethodDescriptionlongadd(long delta) Deprecated.longDeprecated.Decrements the value by one.longDeprecated.longgetMax()Deprecated.longgetTotal()Deprecated.longDeprecated.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.toString()Deprecated.
-
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
Deprecated.
-