|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Beta public interface AsyncAtomicReference<E>
A IAtomicReference
that exposes its operations using a ICompletableFuture
so it can be used in the reactive programming model approach.
Method Summary | ||
---|---|---|
ICompletableFuture<Void> |
asyncAlter(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it. |
|
ICompletableFuture<E> |
asyncAlterAndGet(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it and gets the result. |
|
|
asyncApply(IFunction<E,R> function)
Applies a function on the value, the actual stored value will not change. |
|
ICompletableFuture<Void> |
asyncClear()
Clears the current stored reference. |
|
ICompletableFuture<Boolean> |
asyncCompareAndSet(E expect,
E update)
Atomically sets the value to the given updated value only if the current value == the expected value. |
|
ICompletableFuture<Boolean> |
asyncContains(E value)
Checks if the reference contains the value. |
|
ICompletableFuture<E> |
asyncGet()
Gets the current value. |
|
ICompletableFuture<E> |
asyncGetAndAlter(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it on and gets the old value. |
|
ICompletableFuture<E> |
asyncGetAndSet(E newValue)
Gets the value and sets the new value. |
|
ICompletableFuture<Boolean> |
asyncIsNull()
Checks if the stored reference is null. |
|
ICompletableFuture<Void> |
asyncSet(E newValue)
Atomically sets the given value. |
|
ICompletableFuture<E> |
asyncSetAndGet(E update)
Deprecated. will be removed from Hazelcast 3.4 since it doesn't really serve a purpose. |
Methods inherited from interface com.hazelcast.core.IAtomicReference |
---|
alter, alterAndGet, apply, clear, compareAndSet, contains, get, getAndAlter, getAndSet, isNull, set, setAndGet |
Methods inherited from interface com.hazelcast.core.DistributedObject |
---|
destroy, getId, getName, getPartitionKey, getServiceName |
Method Detail |
---|
ICompletableFuture<Boolean> asyncCompareAndSet(E expect, E update)
==
the expected value.
expect
- the expected valueupdate
- the new value
ICompletableFuture<E> asyncGet()
ICompletableFuture<Void> asyncSet(E newValue)
newValue
- the new valueICompletableFuture<E> asyncGetAndSet(E newValue)
newValue
- the new value.
ICompletableFuture<E> asyncSetAndGet(E update)
update
- the new value
ICompletableFuture<Boolean> asyncIsNull()
ICompletableFuture<Void> asyncClear()
ICompletableFuture<Boolean> asyncContains(E value)
value
- the value to check (is allowed to be null).
ICompletableFuture<Void> asyncAlter(IFunction<E,E> function)
function
- the function
IllegalArgumentException
- if function is null.ICompletableFuture<E> asyncAlterAndGet(IFunction<E,E> function)
function
- the function
IllegalArgumentException
- if function is null.ICompletableFuture<E> asyncGetAndAlter(IFunction<E,E> function)
function
- the function
IllegalArgumentException
- if function is null.<R> ICompletableFuture<R> asyncApply(IFunction<E,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 |