AtomicLong

class AtomicLong(value_: Long)

Functions

addAndGet
Link copied to clipboard
Native
fun addAndGet(delta: Int): Long
external fun addAndGet(delta: Long): Long

Increments the value by delta and returns the new value.

compareAndSet
Link copied to clipboard
Native
external fun compareAndSet(expected: Long, new: Long): Boolean

Compares value with expected and replaces it with new value if values matches.

compareAndSwap
Link copied to clipboard
Native
external fun compareAndSwap(expected: Long, new: Long): Long

Compares value with expected and replaces it with new value if values matches.

decrement
Link copied to clipboard
Native
fun decrement()

Decrements value by one.

increment
Link copied to clipboard
Native
fun increment()

Increments value by one.

toString
Link copied to clipboard
Native
open override fun toString(): String

Returns the string representation of this object.

Properties

value
Link copied to clipboard
Native
var value: Long

The value being held by this class.