AtomicReferenceFieldUpdater.Set(Object, Object) Method

Definition

Sets the field of the given object managed by this updater to the given updated value.

[Android.Runtime.Register("set", "(Ljava/lang/Object;Ljava/lang/Object;)V", "GetSet_Ljava_lang_Object_Ljava_lang_Object_Handler")]
public abstract void Set (Java.Lang.Object? obj, Java.Lang.Object? newValue);
[<Android.Runtime.Register("set", "(Ljava/lang/Object;Ljava/lang/Object;)V", "GetSet_Ljava_lang_Object_Ljava_lang_Object_Handler")>]
abstract member Set : Java.Lang.Object * Java.Lang.Object -> unit

Parameters

obj
Object

An object whose field to set

newValue
Object

the new value

Attributes

Remarks

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 compareAndSet.

Java documentation for java.util.concurrent.atomic.AtomicReferenceFieldUpdater.set(T, V).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to