| Modifier and Type | Field and Description |
|---|---|
| private AtomicLong |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public long | decrement(long amount)
Implements net. |
| public long | getAndSet(long newValue)
Implements net. |
| public long | getValue()
Implements net. |
| public long | |
| public long | increment(long amount)
Implements net. |
| public void | setValue(long newValue)
Implements net. |
| value | back to summary |
|---|---|
| private AtomicLong value | |
| CounterImpl | back to summary |
|---|---|
| public CounterImpl() Default Constructor | |
| CounterImpl | back to summary |
|---|---|
| public CounterImpl(long initialValue) Constructor with initial value | |
| decrement | back to summary |
|---|---|
| public long decrement() Implements net. Doc from net. Decrement the counter by 1
| |
| decrement | back to summary |
|---|---|
| public long decrement(long amount) Implements net. Doc from net. Decrement the counter by given amount
| |
| getAndSet | back to summary |
|---|---|
| public long getAndSet(long newValue) Implements net. Doc from net. Returns the value of the counter and sets it to the new value
| |
| getValue | back to summary |
|---|---|
| public long getValue() Implements net. Doc from net. Gets current value of the counter
| |
| increment | back to summary |
|---|---|
| public long increment() Implements net. Doc from net. Increment the counter by 1
| |
| increment | back to summary |
|---|---|
| public long increment(long amount) Implements net. Doc from net. Increment the counter by given amount
| |
| setValue | back to summary |
|---|---|
| public void setValue(long newValue) Implements net. Doc from net. Sets the value of the counter to the supplied value | |