org.mapdb / Atomic / Integer / getAndSet

getAndSet

fun getAndSet(newValue: Int): Int

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

Parameters

newValue - the new value

Return
the previous value