Class AtomixAtomicCounter
- java.lang.Object
-
- org.onosproject.store.atomix.primitives.impl.AtomixAtomicCounter
-
- All Implemented Interfaces:
org.onosproject.store.service.AsyncAtomicCounter,org.onosproject.store.service.DistributedPrimitive
public class AtomixAtomicCounter extends Object implements org.onosproject.store.service.AsyncAtomicCounter
Atomix atomic counter.
-
-
Constructor Summary
Constructors Constructor Description AtomixAtomicCounter(io.atomix.core.counter.AsyncAtomicCounter atomixCounter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Long>addAndGet(long delta)CompletableFuture<Boolean>compareAndSet(long expectedValue, long updateValue)CompletableFuture<Long>get()CompletableFuture<Long>getAndAdd(long delta)CompletableFuture<Long>getAndIncrement()CompletableFuture<Long>incrementAndGet()Stringname()CompletableFuture<Void>set(long value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
name
public String name()
- Specified by:
namein interfaceorg.onosproject.store.service.DistributedPrimitive
-
incrementAndGet
public CompletableFuture<Long> incrementAndGet()
- Specified by:
incrementAndGetin interfaceorg.onosproject.store.service.AsyncAtomicCounter
-
getAndIncrement
public CompletableFuture<Long> getAndIncrement()
- Specified by:
getAndIncrementin interfaceorg.onosproject.store.service.AsyncAtomicCounter
-
getAndAdd
public CompletableFuture<Long> getAndAdd(long delta)
- Specified by:
getAndAddin interfaceorg.onosproject.store.service.AsyncAtomicCounter
-
addAndGet
public CompletableFuture<Long> addAndGet(long delta)
- Specified by:
addAndGetin interfaceorg.onosproject.store.service.AsyncAtomicCounter
-
get
public CompletableFuture<Long> get()
- Specified by:
getin interfaceorg.onosproject.store.service.AsyncAtomicCounter
-
set
public CompletableFuture<Void> set(long value)
- Specified by:
setin interfaceorg.onosproject.store.service.AsyncAtomicCounter
-
compareAndSet
public CompletableFuture<Boolean> compareAndSet(long expectedValue, long updateValue)
- Specified by:
compareAndSetin interfaceorg.onosproject.store.service.AsyncAtomicCounter
-
-