Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jetty.util.statistic
Class CounterStatistic

    java.lang.Object
      org.eclipse.jetty.util.statistic.CounterStatistic

    public class CounterStatistic

extends java.lang.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.

Field Summary
`protected java.util.concurrent.atomic.AtomicLong` | `_curr`
`protected java.util.concurrent.atomic.AtomicLong` | `_max`
`protected java.util.concurrent.atomic.AtomicLong` | `_total`

Constructor Summary
`CounterStatistic()`

Method Summary
`void` | `add(long delta)`
`void` | `decrement()`
`long` | `getCurrent()`
`long` | `getMax()`
`long` | `getTotal()`
`void` | `increment()`
`void` | `reset()`
`void` | `reset(long value)`
`void` | `subtract(long delta)`
`protected void` | `upxdateMax(long value)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _max

    protected final java.util.concurrent.atomic.AtomicLong _max

### _curr

    protected final java.util.concurrent.atomic.AtomicLong _curr

### _total

    protected final java.util.concurrent.atomic.AtomicLong _total

Constructor Detail

### CounterStatistic

    public CounterStatistic()

Method Detail

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.