AtomicLongArray
An array of longs in which elements may be updated atomically.
Platform-specific implementation details:
When targeting the Native backend, AtomicLongArray stores a LongArray and atomically updates it's elements. For additional details about atomicity guarantees for reads and writes see kotlin.concurrent.Volatile.
When targeting the JVM, instances of AtomicLongArray are represented by java.util.concurrent.atomic.AtomicLongArray. For details about guarantees of volatile accesses and updates of atomics refer to The Java Language Specification (17.4 Memory Model).
For JS and Wasm AtomicLongArray is implemented trivially and is not thread-safe since these platforms do not support multi-threading.
Since Kotlin
2.1An array of longs in which elements may be updated atomically.
Since the JS platform does not support multi-threading, the implementation is trivial and has no atomic synchronizations.
Since Kotlin
2.1An array of longs in which elements may be updated atomically.
Instances of AtomicLongArray are represented by java.util.concurrent.atomic.AtomicLongArray and provide the the same atomicity guarantees.
Since Kotlin
2.1An array of longs in which elements may be updated atomically.
Read operation loadAt has the same memory effects as reading a Volatile property; Write operation storeAt has the same memory effects as writing a Volatile property; Read-modify-write operations, like exchangeAt, compareAndSetAt, compareAndExchangeAt, fetchAndAddAt, addAndFetchAt, have the same memory effects as reading and writing a Volatile property.
For additional details about atomicity guarantees for reads and writes see kotlin.concurrent.Volatile.
Since Kotlin
2.1An array of longs in which elements may be updated atomically.
Since the Wasm platform does not support multi-threading, the implementation is trivial and has no atomic synchronizations.
Since Kotlin
2.1An array of longs in which elements may be updated atomically.
Since the Wasm platform does not support multi-threading, the implementation is trivial and has no atomic synchronizations.
Since Kotlin
2.1Constructors
Creates a new AtomicLongArray of the specified size, with all elements initialized to zero.
Creates a new AtomicLongArray filled with elements of the given array.
Creates a new AtomicLongArray of the given size, with all elements initialized to zero.
Creates a new AtomicIntArray filled with elements of the given array.
Creates a new AtomicLongArray of the given size, with all elements initialized to zero.
Creates a new AtomicLongArray filled with elements of the given array.
Creates a new AtomicLongArray of the specified size, with all elements initialized to zero.
Creates a new AtomicLongArray filled with elements of the given array.
Creates a new AtomicLongArray of the given size, with all elements initialized to zero.
Creates a new AtomicIntArray filled with elements of the given array.
Creates a new AtomicLongArray of the given size, with all elements initialized to zero.
Creates a new AtomicIntArray filled with elements of the given array.
Functions
Atomically adds the given delta to the element of this AtomicLongArray at the given index and returns the new value of the element.
Atomically adds the given delta to the element of this AtomicLongArray at the given index and returns the new value of the element.
Atomically adds the given delta to the element of this AtomicLongArray at the given index and returns the new value of the element.
Atomically adds the given delta to the element of this AtomicLongArray at the given index and returns the new value of the element.
Atomically adds the given delta the element of this AtomicLongArray at the given index by and returns the new value of the element.
Atomically adds the given delta the element of this AtomicLongArray at the given index by and returns the new value of the element.
Casts the given AtomicLongArray instance to java.util.concurrent.atomic.AtomicLongArray.
Atomically sets the value of the element at the given index to the new value if the current value equals the expected value and returns the old value of the element in any case.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value and returns the old value of the element in any case.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value and returns the old value of the element in any case.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value and returns the old value of the element in any case.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value and returns the old value of the element in any case.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value and returns the old value of the element in any case.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value and returns the old value of the element in any case.
Atomically sets the value of the element at the given index to the new value if the current value equals the expected value. Returns true if the operation was successful and false only if the current value of the element was not equal to the expected value.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value. Returns true if the operation was successful and false only if the current value of the element was not equal to the expected value.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value. Returns true if the operation was successful and false only if the current value of the element was not equal to the expected value.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value. Returns true if the operation was successful and false only if the current value of the element was not equal to the expected value.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value. Returns true if the operation was successful and false only if the current value of the element was not equal to the expected value.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value. Returns true if the operation was successful and false only if the current value of the element was not equal to the expected value.
Atomically stores the new value into the element of this AtomicLongArray at the given index if the current value equals the expected value. Returns true if the operation was successful and false only if the current value of the element was not equal to the expected value.
Atomically decrements the element of this AtomicLongArray at the given index by one and returns the new value of the element.
Atomically decrements the element at the given index by one and returns the new value of the element.
Atomically stores the new value into the element of this AtomicLongArray at the given index and returns the old value of the element.
Atomically stores the new value into the element of this AtomicLongArray at the given index and returns the old value of the element.
Atomically stores the new value into the element of this AtomicLongArray at the given index and returns the old value of the element.
Atomically stores the new value into the element of this AtomicLongArray at the given index and returns the old value of the element.
Atomically stores the new value into the element of this AtomicLongArray at the given index and returns the old value of the element.
Atomically stores the new value into the element of this AtomicLongArray at the given index and returns the old value of the element.
Atomically adds the given delta to the element of this AtomicLongArray at the given index and returns the old value of the element.
Atomically adds the given delta to the element of this AtomicLongArray at the given index and returns the old value of the element.
Atomically adds the given delta to the element of this AtomicLongArray at the given index and returns the old value of the element.
Atomically adds the given delta to the element of this AtomicLongArray at the given index and returns the old value of the element.
Atomically adds the given delta the element of this AtomicLongArray at the given index by and returns the old value of the element.
Atomically adds the given delta the element of this AtomicLongArray at the given index by and returns the old value of the element.
Atomically decrements the element of this AtomicLongArray at the given index by one and returns the old value of the element.
Atomically increments the element of this AtomicLongArray at the given index by one and returns the old value of the element.
Atomically decrements the element at the given index by one and returns the old value of the element.
Atomically increments the element at the given index by one and returns the old value of the element.
Atomically increments the element of this AtomicLongArray at the given index by one and returns the new value of the element.
Atomically increments the element at the given index by one and returns the new value of the element.
Atomically loads the value from the element of this AtomicLongArray at the given index.
Atomically loads the value from the element of this AtomicLongArray at the given index.
Atomically loads the value from the element of this AtomicLongArray at the given index.
Atomically loads the value from the element of this AtomicLongArray at the given index.
Atomically loads the value from the element of this AtomicLongArray at the given index.
Atomically loads the value from the element of this AtomicLongArray at the given index.
Atomically stores the new value into the element of this AtomicLongArray at the given index.
Atomically stores the new value into the element of this AtomicLongArray at the given index.
Atomically stores the new value into the element of this AtomicLongArray at the given index.
Atomically stores the new value into the element of this AtomicLongArray at the given index.
Atomically stores the new value into the element of this AtomicLongArray at the given index.
Returns the string representation of the underlying array of longs.
Returns the string representation of the underlying array of longs.
Returns the string representation of the underlying array of longs.
Returns the string representation of the underlying array of ints.
Returns the string representation of the underlying array of longs.