public interface GridCacheAtomicReference<T>
get() synchronously gets current value of an atomic reference.
set(Object) synchronously and unconditionally sets the value in the an atomic reference.
compareAndSet(...) synchronously and conditionally set the value in the an atomic reference.
name() gets name of atomic reference.
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareAndSet(T expVal,
T newVal)
Conditionally sets the new value.
|
T |
get()
Gets current value of an atomic reference.
|
String |
name()
Name of atomic reference.
|
boolean |
removed()
Gets status of atomic.
|
void |
set(T val)
Unconditionally sets the value.
|
String name()
T get() throws GridException
GridException - If operation failed.void set(T val) throws GridException
val - Value.GridException - If operation failed.boolean compareAndSet(T expVal, T newVal) throws GridException
expVal is equal
to current value respectively.expVal - Expected value.newVal - New value.true than value have been updated.GridException - If operation failed.boolean removed()
true if an atomic reference was removed from cache, false otherwise.Copyright © 2014. All rights reserved.