public interface Counter
Modifier and Type | Method and Description |
---|---|
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
|
long increment()
long decrement()
long getAndSet(long newValue)
newValue
- long getValue()
long increment(long amount)
amount
- long decrement(long amount)
amount
- void setValue(long newValue)
newValue
- Copyright 2001-2019, Terracotta, Inc.