| java.lang.Object org.jboss.jmx.adaptor.snmp.agent.Counter
Counter | final public class Counter (Code) | | Simple, thread safe counter implementattion with accessor methods.
(Maybe replace with EDU.oswego.cs.dl.util.concurrent.SynchronizedLong?)
version: $Revision: 44599 $ author: Spyros Pollatos author: Dimitris Andreadis |
Constructor Summary | |
public | Counter(long countStart) CTOR - initialises the counter to the provided value. |
Method Summary | |
public synchronized long | advance() Returns the current value (i.e. | public synchronized long | peek() Returns the current value (i.e. |
Counter | public Counter(long countStart)(Code) | | CTOR - initialises the counter to the provided value.
Parameters: countStart - the starting counter value |
advance | public synchronized long advance()(Code) | | Returns the current value (i.e. the next to be used) and advances
the counter by one.
|
peek | public synchronized long peek()(Code) | | Returns the current value (i.e. the next to be used).
|
|
|