T- The type of the object holding the updatable field
public abstract class UncheckedAtomicIntegerFieldUpdater<T> extends Object
Note that the guarantees of the 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 and volatile semantics only with respect to other invocations of compareAndSet and set.
|Constructor and Description|
|Modifier and Type||Method and Description|
Creates an updater for objects with the given field.
public static <U> AtomicIntegerFieldUpdater<U> newUpdater(Class<U> tclass, String fieldName)
tclass- the class of the objects holding the field
fieldName- the name of the field to be updated.
IllegalArgumentException- if the field is not a volatile integer type.
RuntimeException- with a nested reflection-based exception if the class does not hold field or is the wrong type.
Copyright © GigaSpaces.