public interface GridCacheAtomicStamped<T,S>
get() synchronously gets both value and stamp of atomic.
value() synchronously gets current value of atomic.
stamp() synchronously gets current stamp of atomic.
set(Object, Object) synchronously and unconditionally sets the value
and the stamp in the atomic.
compareAndSet(...) synchronously and conditionally set the value
and the stamp in the atomic.
name() gets name of atomic stamped.
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareAndSet(T expVal,
T newVal,
S expStamp,
S newStamp)
Conditionally sets the new value and new stamp.
|
GridBiTuple<T,S> |
get()
Gets both current value and current stamp of atomic stamped.
|
String |
name()
Name of atomic stamped.
|
boolean |
removed()
Gets status of atomic.
|
void |
set(T val,
S stamp)
Unconditionally sets the value and the stamp.
|
S |
stamp()
Gets current stamp.
|
T |
value()
Gets current value.
|
String name()
GridBiTuple<T,S> get() throws GridException
GridException - If operation failed.void set(T val, S stamp) throws GridException
val - Value.stamp - Stamp.GridException - If operation failed.boolean compareAndSet(T expVal, T newVal, S expStamp, S newStamp) throws GridException
expVal
and expStamp are equal to current value and current stamp respectively.expVal - Expected value.newVal - New value.expStamp - Expected stamp.newStamp - New stamp.true than value and stamp will be updated.GridException - If operation failed.S stamp() throws GridException
GridException - If operation failed.T value() throws GridException
GridException - If operation failed.boolean removed()
true if atomic stamped was removed from cache, false otherwise.Copyright © 2014. All rights reserved.