org.eclipse.jetty.util.statistic
Class CounterStatistic
java.lang.Object
org.eclipse.jetty.util.statistic.CounterStatistic
public class CounterStatistic
- extends Object
Statistics 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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_max
protected final AtomicLong _max
_curr
protected final AtomicLong _curr
_total
protected final AtomicLong _total
CounterStatistic
public CounterStatistic()
reset
public void reset()
reset
public void reset(long value)
add
public void add(long delta)
- Parameters:
delta
- the amount to add to the count
subtract
public void subtract(long delta)
- Parameters:
delta
- the amount to subtract the count by.
increment
public void increment()
decrement
public void decrement()
getMax
public long getMax()
- Returns:
- max value
getCurrent
public long getCurrent()
- Returns:
- current value
getTotal
public long getTotal()
- Returns:
- total value
upxdateMax
protected void upxdateMax(long value)
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.