November 2018
Beginner to intermediate
260 pages
6h 12m
English
The IgniteAtomicStamped interface provides a rich API for working with distributed atomic stamped values. It is different from IgniteAtomicReference, as IgniteAtomicStamped keeps both an object reference and a stamp internally. The reference and stamp can both be changed using a single atomic operation.
Atomic stamped can be defined as follows:
IgniteAtomicStamped<String, Integer> stamp = ignite.atomicStamped("myStamp" , //atomic stamped name "my init value", //initial value 0, //initial stamp true // create if doesn't exist);
Similar to atomic reference, stamped has the compareAndSet(T expVal, T newVal, S expStamp, S newStamp) method to conditionally set the new value and new stamp. It will be set if expVal and expStamp ...
Read now
Unlock full access