站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 varia API Documentation 英文版文档

Counter (Various API) - JBoss 4.0.1 sp1 varia API Documentation 英文版文档


org.jboss.jmx.adaptor.snmp.agent
Class Counter

java.lang.Object
  extended byorg.jboss.jmx.adaptor.snmp.agent.Counter

public final class Counter
extends Object

Simple, thread safe counter implementattion with accessor methods. (Maybe replace with EDU.oswego.cs.dl.util.concurrent.SynchronizedLong?)

Version:
$Revision: 1.2.6.1 $
Author:
Spyros Pollatos, Dimitris Andreadis

Constructor Summary
Counter(long countStart)
          CTOR - initialises the counter to the provided value.
 
Method Summary
 long advance()
          Returns the current value (i.e.
 long peek()
          Returns the current value (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Counter

public Counter(long countStart)
CTOR - initialises the counter to the provided value.

Parameters:
countStart - the starting counter value
Method Detail

peek

public long peek()
Returns the current value (i.e. the next to be used).


advance

public long advance()
Returns the current value (i.e. the next to be used) and advances the counter by one.



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.