public class DefaultAsyncAtomicLong extends AbstractResource<AsyncAtomicLong> implements AsyncAtomicLong
context, executor, serializer| Constructor and Description |
|---|
DefaultAsyncAtomicLong(ResourceContext context) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Long> |
addAndGet(long value)
Adds to the current value and returns the updated value.
|
CompletableFuture<Void> |
close() |
CompletableFuture<Boolean> |
compareAndSet(long expect,
long update)
Compares the current value and updates the value if expected value == actual value.
|
CompletableFuture<Long> |
decrementAndGet()
Decrements and returns the current value.
|
CompletableFuture<Long> |
get()
Gets the current value.
|
CompletableFuture<Long> |
getAndAdd(long value)
Gets the current value and then adds to it.
|
CompletableFuture<Long> |
getAndDecrement()
Gets the current value and decrements it.
|
CompletableFuture<Long> |
getAndIncrement()
Gets the current value and increments it.
|
CompletableFuture<Long> |
getAndSet(long value)
Gets the current value and then sets it.
|
CompletableFuture<Long> |
incrementAndGet()
Increments and returns the current value.
|
CompletableFuture<AsyncAtomicLong> |
open() |
CompletableFuture<Void> |
set(long value)
Sets the current value.
|
addShutdownTask, addStartupTask, cluster, isClosed, isOpen, name, runShutdownTasks, runStartupTasksclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, create, createaddShutdownTask, addStartupTask, cluster, namepublic DefaultAsyncAtomicLong(ResourceContext context)
public CompletableFuture<Long> get()
AsyncAtomicLongProxyget in interface AsyncAtomicLongProxypublic CompletableFuture<Void> set(long value)
AsyncAtomicLongProxyset in interface AsyncAtomicLongProxyvalue - The current value.public CompletableFuture<Long> addAndGet(long value)
AsyncAtomicLongProxyaddAndGet in interface AsyncAtomicLongProxyvalue - The value to add.public CompletableFuture<Long> getAndAdd(long value)
AsyncAtomicLongProxygetAndAdd in interface AsyncAtomicLongProxyvalue - The value to add.public CompletableFuture<Long> getAndSet(long value)
AsyncAtomicLongProxygetAndSet in interface AsyncAtomicLongProxyvalue - The value to set.public CompletableFuture<Long> getAndIncrement()
AsyncAtomicLongProxygetAndIncrement in interface AsyncAtomicLongProxypublic CompletableFuture<Long> getAndDecrement()
AsyncAtomicLongProxygetAndDecrement in interface AsyncAtomicLongProxypublic CompletableFuture<Long> incrementAndGet()
AsyncAtomicLongProxyincrementAndGet in interface AsyncAtomicLongProxypublic CompletableFuture<Long> decrementAndGet()
AsyncAtomicLongProxydecrementAndGet in interface AsyncAtomicLongProxypublic CompletableFuture<Boolean> compareAndSet(long expect, long update)
AsyncAtomicLongProxycompareAndSet in interface AsyncAtomicLongProxyexpect - The expected value.update - The updated value.public CompletableFuture<AsyncAtomicLong> open()
open in interface Managed<AsyncAtomicLong>public CompletableFuture<Void> close()
close in interface Managed<AsyncAtomicLong>Copyright © 2013-2015. All Rights Reserved.