Liking cljdoc? Tell your friends :D

jdk.util.concurrent.atomic.AtomicBoolean

A boolean value that may be updated atomically. See the java.util.concurrent.atomic package specification for description of the properties of atomic variables. An AtomicBoolean is used in applications such as atomically updated flags, and cannot be used as a replacement for a Boolean.

A boolean value that may be updated atomically. See the
java.util.concurrent.atomic package specification for
description of the properties of atomic variables. An
AtomicBoolean is used in applications such as atomically
updated flags, and cannot be used as a replacement for a
Boolean.
raw docstring

->atomic-booleanclj

(->atomic-boolean)
(->atomic-boolean initial-value)

Constructor.

Creates a new AtomicBoolean with the given initial value.

initial-value - the initial value - boolean

Constructor.

Creates a new AtomicBoolean with the given initial value.

initial-value - the initial value - `boolean`
raw docstring

compare-and-setclj

(compare-and-set this expect update)

Atomically sets the value to the given updated value if the current value == the expected value.

expect - the expected value - boolean update - the new value - boolean

returns: true if successful. False return indicates that the actual value was not equal to the expected value. - boolean

Atomically sets the value to the given updated value
 if the current value == the expected value.

expect - the expected value - `boolean`
update - the new value - `boolean`

returns: true if successful. False return indicates that
 the actual value was not equal to the expected value. - `boolean`
raw docstring

getclj

(get this)

Returns the current value.

returns: the current value - boolean

Returns the current value.

returns: the current value - `boolean`
raw docstring

get-and-set?clj

(get-and-set? this new-value)

Atomically sets to the given value and returns the previous value.

new-value - the new value - boolean

returns: the previous value - boolean

Atomically sets to the given value and returns the previous value.

new-value - the new value - `boolean`

returns: the previous value - `boolean`
raw docstring

lazy-setclj

(lazy-set this new-value)

Eventually sets to the given value.

new-value - the new value - boolean

Eventually sets to the given value.

new-value - the new value - `boolean`
raw docstring

setclj

(set this new-value)

Unconditionally sets to the given value.

new-value - the new value - boolean

Unconditionally sets to the given value.

new-value - the new value - `boolean`
raw docstring

to-stringclj

(to-string this)

Returns the String representation of the current value.

returns: the String representation of the current value - java.lang.String

Returns the String representation of the current value.

returns: the String representation of the current value - `java.lang.String`
raw docstring

weak-compare-and-setclj

(weak-compare-and-set this expect update)

Atomically sets the value to the given updated value if the current value == the expected value.

May fail spuriously and does not provide ordering guarantees, so is only rarely an appropriate alternative to compareAndSet.

expect - the expected value - boolean update - the new value - boolean

returns: true if successful - boolean

Atomically sets the value to the given updated value
 if the current value == the expected value.

 May fail
 spuriously and does not provide ordering guarantees, so is
 only rarely an appropriate alternative to compareAndSet.

expect - the expected value - `boolean`
update - the new value - `boolean`

returns: true if successful - `boolean`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close