public class DefaultAsyncBoolean extends net.kuujo.copycat.resource.internal.AbstractResource<AsyncBoolean> implements AsyncBoolean
| Constructor and Description |
|---|
DefaultAsyncBoolean(net.kuujo.copycat.resource.internal.ResourceManager 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<AsyncBoolean> |
open() |
CompletableFuture<Void> |
set(boolean value)
Sets the current value.
|
addShutdownTask, addStartupTask, cluster, isClosed, isOpen, name, runShutdownTasks, runStartupTasks, stateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, create, createpublic DefaultAsyncBoolean(net.kuujo.copycat.resource.internal.ResourceManager context)
public CompletableFuture<Boolean> get()
AsyncBooleanProxyget in interface AsyncBooleanProxypublic CompletableFuture<Void> set(boolean value)
AsyncBooleanProxyset in interface AsyncBooleanProxyvalue - The current value.public CompletableFuture<Boolean> getAndSet(boolean value)
AsyncBooleanProxygetAndSet in interface AsyncBooleanProxyvalue - The updated value.public CompletableFuture<Boolean> compareAndSet(boolean expect, boolean update)
AsyncBooleanProxycompareAndSet in interface AsyncBooleanProxyexpect - The expected value.update - The updated value.public CompletableFuture<AsyncBoolean> open()
open in interface net.kuujo.copycat.util.Managed<AsyncBoolean>public CompletableFuture<Void> close()
close in interface net.kuujo.copycat.util.Managed<AsyncBoolean>Copyright © 2013-2015. All Rights Reserved.