org.mapdb / Atomic / Boolean

Boolean

class Boolean

A boolean record that may be updated atomically.



Constructors

<init> Boolean(store: Store, recid: Long)

Functions

compareAndSet fun compareAndSet(expect: Boolean, update: Boolean): Boolean

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

get fun get(): Boolean

Returns the current value.

getAndSet fun getAndSet(newValue: Boolean): Boolean

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

getRecid fun getRecid(): Long

set fun set(newValue: Boolean): Unit

Unconditionally sets to the given value.

toString fun toString(): String

Returns the String representation of the current value.