Liking cljdoc? Tell your friends :D

jdk.util.concurrent.atomic.AtomicLongArray

A long array in which elements may be updated atomically. See the java.util.concurrent.atomic package specification for description of the properties of atomic variables.

A long array in which elements may be updated atomically.
See the java.util.concurrent.atomic package specification
for description of the properties of atomic variables.
raw docstring

->atomic-long-arrayclj

(->atomic-long-array length)

Constructor.

Creates a new AtomicLongArray of the given length, with all elements initially zero.

length - the length of the array - int

Constructor.

Creates a new AtomicLongArray of the given length, with all
 elements initially zero.

length - the length of the array - `int`
raw docstring

accumulate-and-getclj

(accumulate-and-get this i x accumulator-function)

Atomically updates the element at index i with the results of applying the given function to the current and given values, returning the updated value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads. The function is applied with the current value at index i as its first argument, and the given update as the second argument.

i - the index - int x - the update value - long accumulator-function - a side-effect-free function of two arguments - java.util.function.LongBinaryOperator

returns: the updated value - long

Atomically updates the element at index i with the
 results of applying the given function to the current and
 given values, returning the updated value. The function should
 be side-effect-free, since it may be re-applied when attempted
 updates fail due to contention among threads.  The function is
 applied with the current value at index i as its first
 argument, and the given update as the second argument.

i - the index - `int`
x - the update value - `long`
accumulator-function - a side-effect-free function of two arguments - `java.util.function.LongBinaryOperator`

returns: the updated value - `long`
raw docstring

add-and-getclj

(add-and-get this i delta)

Atomically adds the given value to the element at index i.

i - the index - int delta - the value to add - long

returns: the updated value - long

Atomically adds the given value to the element at index i.

i - the index - `int`
delta - the value to add - `long`

returns: the updated value - `long`
raw docstring

compare-and-setclj

(compare-and-set this i expect update)

Atomically sets the element at position i to the given updated value if the current value == the expected value.

i - the index - int expect - the expected value - long update - the new value - long

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

Atomically sets the element at position i to the given
 updated value if the current value == the expected value.

i - the index - `int`
expect - the expected value - `long`
update - the new value - `long`

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

decrement-and-getclj

(decrement-and-get this i)

Atomically decrements by one the element at index i.

i - the index - int

returns: the updated value - long

Atomically decrements by one the element at index i.

i - the index - `int`

returns: the updated value - `long`
raw docstring

getclj

(get this i)

Gets the current value at position i.

i - the index - int

returns: the current value - long

Gets the current value at position i.

i - the index - `int`

returns: the current value - `long`
raw docstring

get-and-accumulateclj

(get-and-accumulate this i x accumulator-function)

Atomically updates the element at index i with the results of applying the given function to the current and given values, returning the previous value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads. The function is applied with the current value at index i as its first argument, and the given update as the second argument.

i - the index - int x - the update value - long accumulator-function - a side-effect-free function of two arguments - java.util.function.LongBinaryOperator

returns: the previous value - long

Atomically updates the element at index i with the
 results of applying the given function to the current and
 given values, returning the previous value. The function should
 be side-effect-free, since it may be re-applied when attempted
 updates fail due to contention among threads.  The function is
 applied with the current value at index i as its first
 argument, and the given update as the second argument.

i - the index - `int`
x - the update value - `long`
accumulator-function - a side-effect-free function of two arguments - `java.util.function.LongBinaryOperator`

returns: the previous value - `long`
raw docstring

get-and-addclj

(get-and-add this i delta)

Atomically adds the given value to the element at index i.

i - the index - int delta - the value to add - long

returns: the previous value - long

Atomically adds the given value to the element at index i.

i - the index - `int`
delta - the value to add - `long`

returns: the previous value - `long`
raw docstring

get-and-decrementclj

(get-and-decrement this i)

Atomically decrements by one the element at index i.

i - the index - int

returns: the previous value - long

Atomically decrements by one the element at index i.

i - the index - `int`

returns: the previous value - `long`
raw docstring

get-and-incrementclj

(get-and-increment this i)

Atomically increments by one the element at index i.

i - the index - int

returns: the previous value - long

Atomically increments by one the element at index i.

i - the index - `int`

returns: the previous value - `long`
raw docstring

get-and-setclj

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

Atomically sets the element at position i to the given value and returns the old value.

i - the index - int new-value - the new value - long

returns: the previous value - long

Atomically sets the element at position i to the given value
 and returns the old value.

i - the index - `int`
new-value - the new value - `long`

returns: the previous value - `long`
raw docstring

get-and-updateclj

(get-and-update this i update-function)

Atomically updates the element at index i with the results of applying the given function, returning the previous value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads.

i - the index - int update-function - a side-effect-free function - java.util.function.LongUnaryOperator

returns: the previous value - long

Atomically updates the element at index i with the results
 of applying the given function, returning the previous value. The
 function should be side-effect-free, since it may be re-applied
 when attempted updates fail due to contention among threads.

i - the index - `int`
update-function - a side-effect-free function - `java.util.function.LongUnaryOperator`

returns: the previous value - `long`
raw docstring

increment-and-getclj

(increment-and-get this i)

Atomically increments by one the element at index i.

i - the index - int

returns: the updated value - long

Atomically increments by one the element at index i.

i - the index - `int`

returns: the updated value - `long`
raw docstring

lazy-setclj

(lazy-set this i new-value)

Eventually sets the element at position i to the given value.

i - the index - int new-value - the new value - long

Eventually sets the element at position i to the given value.

i - the index - `int`
new-value - the new value - `long`
raw docstring

lengthclj

(length this)

Returns the length of the array.

returns: the length of the array - int

Returns the length of the array.

returns: the length of the array - `int`
raw docstring

setclj

(set this i new-value)

Sets the element at position i to the given value.

i - the index - int new-value - the new value - long

Sets the element at position i to the given value.

i - the index - `int`
new-value - the new value - `long`
raw docstring

to-stringclj

(to-string this)

Returns the String representation of the current values of array.

returns: the String representation of the current values of array - java.lang.String

Returns the String representation of the current values of array.

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

update-and-getclj

(update-and-get this i update-function)

Atomically updates the element at index i with the results of applying the given function, returning the updated value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads.

i - the index - int update-function - a side-effect-free function - java.util.function.LongUnaryOperator

returns: the updated value - long

Atomically updates the element at index i with the results
 of applying the given function, returning the updated value. The
 function should be side-effect-free, since it may be re-applied
 when attempted updates fail due to contention among threads.

i - the index - `int`
update-function - a side-effect-free function - `java.util.function.LongUnaryOperator`

returns: the updated value - `long`
raw docstring

weak-compare-and-setclj

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

Atomically sets the element at position i 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.

i - the index - int expect - the expected value - long update - the new value - long

returns: true if successful - boolean

Atomically sets the element at position i 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.

i - the index - `int`
expect - the expected value - `long`
update - the new value - `long`

returns: true if successful - `boolean`
raw docstring

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

× close