Java java.util.concurrent.atomic AtomicReference fields, constructors, methods, implement or subclass

Example usage for Java java.util.concurrent.atomic AtomicReference fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.concurrent.atomic AtomicReference.

The text is from its open source code.

Subclass

java.util.concurrent.atomic.AtomicReference has subclasses.
Click this link to see all its subclasses.

Constructor

AtomicReference()
Creates a new AtomicReference with null initial value.
AtomicReference(V initialValue)
Creates a new AtomicReference with the given initial value.

Method

booleancompareAndSet(V expectedValue, V newValue)
Atomically sets the value to newValue if the current value == expectedValue , with memory effects as specified by VarHandle#compareAndSet .
Vget()
Returns the current value, with memory effects as specified by VarHandle#getVolatile .
VgetAndSet(V newValue)
Atomically sets the value to newValue and returns the old value, with memory effects as specified by VarHandle#getAndSet .
voidnotify()
Wakes up a single thread that is waiting on this object's monitor.
voidnotifyAll()
Wakes up all threads that are waiting on this object's monitor.
voidset(V newValue)
Sets the value to newValue , with memory effects as specified by VarHandle#setVolatile .
StringtoString()
Returns the String representation of the current value.
VupdateAndGet(UnaryOperator updateFunction)
Atomically updates (with memory effects as specified by VarHandle#compareAndSet ) the current value with the results of applying the given function, returning the updated value.
voidwait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
voidwait()
Causes the current thread to wait until it is awakened, typically by being notified or interrupted.