AtomicLong

interface AtomicLong(source)

Atomic Long.

Author

ForteScarlet

Properties

Link copied to clipboard
abstract var value: Long

Functions

Link copied to clipboard
abstract fun compareAndExchange(expect: Long, value: Long): Long
Link copied to clipboard
abstract fun compareAndSet(expect: Long, value: Long): Boolean
Link copied to clipboard
abstract fun decrementAndGet(delta: Long = 1): Long
Link copied to clipboard
abstract fun getAndDecrement(delta: Long = 1): Long
Link copied to clipboard
abstract fun getAndIncrement(delta: Long = 1): Long
Link copied to clipboard
abstract fun getAndSet(value: Long): Long
Link copied to clipboard
abstract fun incrementAndGet(delta: Long = 1): Long

Inherited functions

Link copied to clipboard
operator fun AtomicLong.minusAssign(delta: Long)

Operator -= for AtomicLong.

Link copied to clipboard
operator fun AtomicLong.plusAssign(delta: Long)

Operator += for AtomicLong.

Link copied to clipboard
inline fun AtomicLong.update(block: (Long) -> Long): Long

Update value by AtomicLong.compareAndSet and then return the old value.

Link copied to clipboard
inline fun AtomicLong.updateAndGet(block: (Long) -> Long): Long

Update value by AtomicLong.compareAndSet and then return the new value.