public class DefaultAsyncLong extends net.kuujo.copycat.resource.internal.AbstractResource<AsyncLong> implements AsyncLong
| Constructor and Description |
|---|
DefaultAsyncLong(net.kuujo.copycat.resource.internal.ResourceManager 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<AsyncLong> |
open() |
CompletableFuture<Void> |
set(long value)
Sets the current value.
|
addShutdownTask, addStartupTask, cluster, isClosed, isOpen, name, runShutdownTasks, runStartupTasks, stateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic DefaultAsyncLong(net.kuujo.copycat.resource.internal.ResourceManager context)
public CompletableFuture<Long> get()
AsyncLongProxyget in interface AsyncLongProxypublic CompletableFuture<Void> set(long value)
AsyncLongProxyset in interface AsyncLongProxyvalue - The current value.public CompletableFuture<Long> addAndGet(long value)
AsyncLongProxyaddAndGet in interface AsyncLongProxyvalue - The value to add.public CompletableFuture<Long> getAndAdd(long value)
AsyncLongProxygetAndAdd in interface AsyncLongProxyvalue - The value to add.public CompletableFuture<Long> getAndSet(long value)
AsyncLongProxygetAndSet in interface AsyncLongProxyvalue - The value to set.public CompletableFuture<Long> getAndIncrement()
AsyncLongProxygetAndIncrement in interface AsyncLongProxypublic CompletableFuture<Long> getAndDecrement()
AsyncLongProxygetAndDecrement in interface AsyncLongProxypublic CompletableFuture<Long> incrementAndGet()
AsyncLongProxyincrementAndGet in interface AsyncLongProxypublic CompletableFuture<Long> decrementAndGet()
AsyncLongProxydecrementAndGet in interface AsyncLongProxypublic CompletableFuture<Boolean> compareAndSet(long expect, long update)
AsyncLongProxycompareAndSet in interface AsyncLongProxyexpect - The expected value.update - The updated value.public CompletableFuture<AsyncLong> open()
open in interface net.kuujo.copycat.util.Managed<AsyncLong>public CompletableFuture<Void> close()
close in interface net.kuujo.copycat.util.Managed<AsyncLong>Copyright © 2013-2015. All Rights Reserved.