|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.quartz.utils.counter.CounterImpl
public class CounterImpl
A simple counter implementation
Constructor Summary | |
---|---|
CounterImpl()
Default Constructor |
|
CounterImpl(long initialValue)
Constructor with initial value |
Method Summary | |
---|---|
long |
decrement()
Decrement the counter by 1 |
long |
decrement(long amount)
Decrement the counter by given amount |
long |
getAndSet(long newValue)
Returns the value of the counter and sets it to the new value |
long |
getValue()
Gets current value of the counter |
long |
increment()
Increment the counter by 1 |
long |
increment(long amount)
Increment the counter by given amount |
void |
setValue(long newValue)
Sets the value of the counter to the supplied value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CounterImpl()
public CounterImpl(long initialValue)
initialValue
- Method Detail |
---|
public long increment()
increment
in interface Counter
public long decrement()
decrement
in interface Counter
public long getAndSet(long newValue)
getAndSet
in interface Counter
public long getValue()
getValue
in interface Counter
public long increment(long amount)
increment
in interface Counter
public long decrement(long amount)
decrement
in interface Counter
public void setValue(long newValue)
setValue
in interface Counter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |