|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAtomicReference<E>
IAtomicReference is a redundant and highly available distributed alternative to the
java.util.concurrent.atomic.AtomicReference
.
IAtomicLong
Method Summary | ||
---|---|---|
void |
alter(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it. |
|
E |
alterAndGet(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it and gets the result. |
|
|
apply(IFunction<E,R> function)
Applies a function on the value, the actual stored value will not change. |
|
void |
clear()
Clears the current stored reference. |
|
boolean |
compareAndSet(E expect,
E update)
Atomically sets the value to the given updated value only if the current value == the expected value. |
|
boolean |
contains(E value)
Checks if the reference contains the value. |
|
E |
get()
Gets the current value. |
|
E |
getAndAlter(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it on and gets the old value. |
|
E |
getAndSet(E newValue)
Gets the old value and sets the new value. |
|
boolean |
isNull()
Checks if the stored reference is null. |
|
void |
set(E newValue)
Atomically sets the given value. |
|
E |
setAndGet(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.DistributedObject |
---|
destroy, getId, getName, getPartitionKey, getServiceName |
Method Detail |
---|
boolean compareAndSet(E expect, E update)
==
the expected value.
expect
- the expected valueupdate
- the new value
E get()
void set(E newValue)
newValue
- the new valueE getAndSet(E newValue)
newValue
- the new value.
E setAndGet(E update)
update
- the new value
boolean isNull()
void clear()
boolean contains(E value)
value
- the value to check (is allowed to be null).
void alter(IFunction<E,E> function)
function
- the function that alters the currently stored reference
IllegalArgumentException
- if function is null.E alterAndGet(IFunction<E,E> function)
function
- the function that alters the currently stored reference
IllegalArgumentException
- if function is null.E getAndAlter(IFunction<E,E> function)
function
- the function that alters the currently stored reference
IllegalArgumentException
- if function is null.<R> R apply(IFunction<E,R> function)
function
- the function applied on the value, the stored value does not change
IllegalArgumentException
- if function is null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |