|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Beta public interface AsyncAtomicLong
This interface is an IAtomicLong interface that exposes its operations using an
ICompletableFuture interface so it can be used in the reactive programming model
approach.
| Method Summary | ||
|---|---|---|
ICompletableFuture<Long> |
asyncAddAndGet(long delta)
Atomically adds the given value to the current value. |
|
ICompletableFuture<Void> |
asyncAlter(IFunction<Long,Long> function)
Alters the currently stored value by applying a function on it. |
|
ICompletableFuture<Long> |
asyncAlterAndGet(IFunction<Long,Long> function)
Alters the currently stored value by applying a function on it and gets the result. |
|
|
asyncApply(IFunction<Long,R> function)
Applies a function on the value, the actual stored value will not change. |
|
ICompletableFuture<Boolean> |
asyncCompareAndSet(long expect,
long update)
Atomically sets the value to the given updated value only if the current value == the expected value. |
|
ICompletableFuture<Long> |
asyncDecrementAndGet()
Atomically decrements the current value by one. |
|
ICompletableFuture<Long> |
asyncGet()
Gets the current value. |
|
ICompletableFuture<Long> |
asyncGetAndAdd(long delta)
Atomically adds the given value to the current value. |
|
ICompletableFuture<Long> |
asyncGetAndAlter(IFunction<Long,Long> function)
Alters the currently stored value by applying a function on it on and gets the old value. |
|
ICompletableFuture<Long> |
asyncGetAndIncrement()
Atomically increments the current value by one. |
|
ICompletableFuture<Long> |
asyncGetAndSet(long newValue)
Atomically sets the given value and returns the old value. |
|
ICompletableFuture<Long> |
asyncIncrementAndGet()
Atomically increments the current value by one. |
|
ICompletableFuture<Void> |
asyncSet(long newValue)
Atomically sets the given value. |
|
| Methods inherited from interface com.hazelcast.core.IAtomicLong |
|---|
addAndGet, alter, alterAndGet, apply, compareAndSet, decrementAndGet, get, getAndAdd, getAndAlter, getAndIncrement, getAndSet, getName, incrementAndGet, set |
| Methods inherited from interface com.hazelcast.core.DistributedObject |
|---|
destroy, getId, getPartitionKey, getServiceName |
| Method Detail |
|---|
ICompletableFuture<Long> asyncAddAndGet(long delta)
delta - the value to add
ICompletableFuture<Boolean> asyncCompareAndSet(long expect,
long update)
== the expected value.
expect - the expected valueupdate - the new value
ICompletableFuture<Long> asyncDecrementAndGet()
ICompletableFuture<Long> asyncGet()
ICompletableFuture<Long> asyncGetAndAdd(long delta)
delta - the value to add
ICompletableFuture<Long> asyncGetAndSet(long newValue)
newValue - the new value
ICompletableFuture<Long> asyncIncrementAndGet()
ICompletableFuture<Long> asyncGetAndIncrement()
ICompletableFuture<Void> asyncSet(long newValue)
newValue - the new valueICompletableFuture<Void> asyncAlter(IFunction<Long,Long> function)
function - the function
IllegalArgumentException - if function is null.ICompletableFuture<Long> asyncAlterAndGet(IFunction<Long,Long> function)
function - the function
IllegalArgumentException - if function is null.ICompletableFuture<Long> asyncGetAndAlter(IFunction<Long,Long> function)
function - the function
IllegalArgumentException - if function is null.<R> ICompletableFuture<R> asyncApply(IFunction<Long,R> function)
function - the function
IllegalArgumentException - if function is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||