Mainly the lower understand AtomicReference
andAtomicXUpdater
AtomicReference
Support object references atomic updates of class, just support referrals, if you want the object in the field to support atomic updates, be sure to use to AtomicXUpdater
.
Fields update class needs special attention, the field must be public volatile
type.
AtomicStampedReference
And AtomicMarkableReference
are kind to address the ABA problem for (the latter do not know if I have, being no practical experience). The former field update to address aspects of the latter to solve a reference type updates.