org.eclipse.jetty.util.statistic
类 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.


字段摘要
protected  AtomicLong _curr
           
protected  AtomicLong _max
           
protected  AtomicLong _total
           
 
构造方法摘要
CounterStatistic()
           
 
方法摘要
 void add(long delta)
           
 void decrement()
           
 long getCurrent()
           
 long getMax()
           
 long getTotal()
           
 void increment()
           
 void reset()
           
 void reset(long value)
           
 void subtract(long delta)
           
 
从类 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)
参数:
delta - the amount to add to the count

subtract

public void subtract(long delta)
参数:
delta - the amount to subtract the count by.

increment

public void increment()

decrement

public void decrement()

getMax

public long getMax()
返回:
max value

getCurrent

public long getCurrent()
返回:
current value

getTotal

public long getTotal()
返回:
total value


Copyright © 2013. All Rights Reserved.