@Beta public interface AsyncAtomicLong extends IAtomicLong
IAtomicLong
interface that exposes its operations using an
ICompletableFuture
interface so it can be used in the reactive programming model
approach.Modifier and Type | Method and Description |
---|---|
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.
|
<R> ICompletableFuture<R> |
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.
|
addAndGet, alter, alterAndGet, apply, compareAndSet, decrementAndGet, get, getAndAdd, getAndAlter, getAndIncrement, getAndSet, getName, incrementAndGet, set
destroy, getPartitionKey, getServiceName
ICompletableFuture<Long> asyncAddAndGet(long delta)
delta
- the value to addICompletableFuture<Boolean> asyncCompareAndSet(long expect, long update)
==
the expected value.expect
- the expected valueupdate
- the new valueICompletableFuture<Long> asyncDecrementAndGet()
ICompletableFuture<Long> asyncGet()
ICompletableFuture<Long> asyncGetAndAdd(long delta)
delta
- the value to addICompletableFuture<Long> asyncGetAndSet(long newValue)
newValue
- the new valueICompletableFuture<Long> asyncIncrementAndGet()
ICompletableFuture<Long> asyncGetAndIncrement()
ICompletableFuture<Void> asyncSet(long newValue)
newValue
- the new valueICompletableFuture<Void> asyncAlter(IFunction<Long,Long> function)
function
- the functionIllegalArgumentException
- if function is null.ICompletableFuture<Long> asyncAlterAndGet(IFunction<Long,Long> function)
function
- the functionIllegalArgumentException
- if function is null.ICompletableFuture<Long> asyncGetAndAlter(IFunction<Long,Long> function)
function
- the functionIllegalArgumentException
- if function is null.<R> ICompletableFuture<R> asyncApply(IFunction<Long,R> function)
function
- the functionIllegalArgumentException
- if function is null.Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.