Class CounterStatistic
- java.lang.Object
-
- com.aspectran.core.util.statistic.CounterStatistic
-
public class CounterStatistic extends java.lang.ObjectStatistics on a counter value.Keep total, current and maximum values of a counter that can be incremented and decremented. The total refers only to increments.
-
-
Constructor Summary
Constructors Constructor Description CounterStatistic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longadd(long delta)longdecrement()decrement by 1longgetCurrent()longgetMax()longgetTotal()longincrement()increment the value by onevoidreset()voidreset(long value)java.lang.StringtoString()
-
-
-
Method Detail
-
reset
public void reset()
-
reset
public void reset(long value)
-
add
public long add(long delta)
- Parameters:
delta- the amount to add to the count- Returns:
- the new value
-
increment
public long increment()
increment the value by one- Returns:
- the new value, post increment
-
decrement
public long decrement()
decrement by 1- Returns:
- the new value, post-decrement
-
getMax
public long getMax()
- Returns:
- max value
-
getCurrent
public long getCurrent()
- Returns:
- current value
-
getTotal
public long getTotal()
- Returns:
- total value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-