public class DefaultAsyncAtomicBoolean extends AbstractResource<AsyncAtomicBoolean> implements AsyncAtomicBoolean
context, executor, serializer| Constructor and Description |
|---|
DefaultAsyncAtomicBoolean(ResourceContext context) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
close() |
CompletableFuture<Boolean> |
compareAndSet(boolean expect,
boolean update)
Compares the current value and updated it if expected value == the current value.
|
CompletableFuture<Boolean> |
get()
Gets the current value.
|
CompletableFuture<Boolean> |
getAndSet(boolean value)
Gets the current value and updates it.
|
CompletableFuture<AsyncAtomicBoolean> |
open() |
CompletableFuture<Void> |
set(boolean 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 DefaultAsyncAtomicBoolean(ResourceContext context)
public CompletableFuture<Boolean> get()
AsyncAtomicBooleanProxyget in interface AsyncAtomicBooleanProxypublic CompletableFuture<Void> set(boolean value)
AsyncAtomicBooleanProxyset in interface AsyncAtomicBooleanProxyvalue - The current value.public CompletableFuture<Boolean> getAndSet(boolean value)
AsyncAtomicBooleanProxygetAndSet in interface AsyncAtomicBooleanProxyvalue - The updated value.public CompletableFuture<Boolean> compareAndSet(boolean expect, boolean update)
AsyncAtomicBooleanProxycompareAndSet in interface AsyncAtomicBooleanProxyexpect - The expected value.update - The updated value.public CompletableFuture<AsyncAtomicBoolean> open()
open in interface Managed<AsyncAtomicBoolean>public CompletableFuture<Void> close()
close in interface Managed<AsyncAtomicBoolean>Copyright © 2013-2015. All Rights Reserved.