|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Counter
A simple long based counter.
| Method Summary | |
|---|---|
long |
decrement()
Decrements the count by one. |
long |
decrement(long amount)
Decrements the count by amount. |
long |
getAndSet(long newValue)
Set the count to the supplied value, and return the old value. |
long |
increment()
Increments the count by one. |
long |
increment(long amount)
Increments the count by amount. |
void |
setValue(long newValue)
Set the count to the supplied value. |
| Methods inherited from interface org.terracotta.counter.Statistic |
|---|
getAndReset, getValue |
| Method Detail |
|---|
long increment()
long decrement()
long getAndSet(long newValue)
Implementations of this method need not be atomic, all though this method is obviously of little value if the implementation is not atomic.
newValue - value to set to
long increment(long amount)
amount - amount to increment by
long decrement(long amount)
amount - amount to increment by
void setValue(long newValue)
newValue - value to set to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||