public class CrdtCounterDelegate extends Object implements CounterDelegate
| Constructor and Description |
|---|
CrdtCounterDelegate(String name,
CrdtProtocolConfig config,
PrimitiveManagementService managementService) |
| Modifier and Type | Method and Description |
|---|---|
long |
addAndGet(long delta)
Atomically adds the given value to the current value.
|
void |
close()
Closes the counter.
|
long |
decrementAndGet()
Atomically decrement by one and return the updated value.
|
long |
get()
Returns the counter value.
|
long |
getAndAdd(long delta)
Atomically adds the given value to the current value.
|
long |
getAndDecrement()
Atomically decrement by one and return the previous value.
|
long |
getAndIncrement()
Atomically increment by one and return the previous value.
|
long |
incrementAndGet()
Atomically increment by one and return the updated value.
|
public CrdtCounterDelegate(String name, CrdtProtocolConfig config, PrimitiveManagementService managementService)
public long get()
CounterDelegateget in interface CounterDelegatepublic long incrementAndGet()
CounterDelegateincrementAndGet in interface CounterDelegatepublic long decrementAndGet()
CounterDelegatedecrementAndGet in interface CounterDelegatepublic long getAndIncrement()
CounterDelegategetAndIncrement in interface CounterDelegatepublic long getAndDecrement()
CounterDelegategetAndDecrement in interface CounterDelegatepublic long getAndAdd(long delta)
CounterDelegategetAndAdd in interface CounterDelegatedelta - the value to addpublic long addAndGet(long delta)
CounterDelegateaddAndGet in interface CounterDelegatedelta - the value to addpublic void close()
CounterDelegateclose in interface CounterDelegateCopyright © 2013–2018. All rights reserved.