|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.ehcache.util.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 Counterpublic long decrement()
decrement in interface Counterpublic long getAndSet(long newValue)
getAndSet in interface Counterpublic long getValue()
getValue in interface Counterpublic long increment(long amount)
increment in interface Counterpublic long decrement(long amount)
decrement in interface Counterpublic void setValue(long newValue)
setValue in interface Counter
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||