Atomically sets the field of the given object managed by this updater to the given updated value if the current value {@code ==} the expected value. This method is guaranteed to be atomic with respect to other calls to {@code compareAndSet} and {@code set}, but not necessarily with respect to other changes in the field.
Atomically decrements by one the current value of the field of the given object managed by this updater.
Returns the current value held in the field of the given object managed by this updater.
Atomically adds the given value to the current value of the field of the given object managed by this updater.
Atomically increments by one the current value of the field of the given object managed by this updater.
Sets the field of the given object managed by this updater to the given updated value. This operation is guaranteed to act as a volatile store with respect to subsequent invocations of {@code compareAndSet}.
A reflection-based utility that enables atomic updates to designated {@code volatile int} fields of designated classes. This class is designed for use in atomic data structures in which several fields of the same node are independently subject to atomic updates.
<p>Note that the guarantees of the {@code compareAndSet} method in this class are weaker than in other atomic classes. Because this class cannot ensure that all uses of the field are appropriate for purposes of atomic access, it can guarantee atomicity only with respect to other invocations of {@code compareAndSet} and {@code set} on the same updater.
<p>Object arguments for parameters of type {@code T} that are not instances of the class passed to {@link #newUpdater} will result in a {@link ClassCastException} being thrown.
@author Doug Lea @param <T> The type of the object holding the updatable field