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

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

Introduction

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

The text is from its open source code.

Subclass

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

Constructor

AtomicBoolean()
Creates a new AtomicBoolean with initial value false .
AtomicBoolean(boolean initialValue)
Creates a new AtomicBoolean with the given initial value.

Method

booleancompareAndSet(boolean expectedValue, boolean newValue)
Atomically sets the value to newValue if the current value == expectedValue , with memory effects as specified by VarHandle#compareAndSet .
booleanget()
Returns the current value, with memory effects as specified by VarHandle#getVolatile .
booleangetAndSet(boolean newValue)
Atomically sets the value to newValue and returns the old value, with memory effects as specified by VarHandle#getAndSet .
voidlazySet(boolean newValue)
Sets the value to newValue , with memory effects as specified by VarHandle#setRelease .
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(boolean newValue)
Sets the value to newValue , with memory effects as specified by VarHandle#setVolatile .
StringtoString()
Returns the String representation of the current 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.
booleanweakCompareAndSet(boolean expectedValue, boolean newValue)
Possibly atomically sets the value to newValue if the current value == expectedValue , with memory effects as specified by VarHandle#weakCompareAndSetPlain .