compareAndSet

open suspend override fun compareAndSet(key: String, expected: String?, new: String): Boolean

Atomically sets key to new only if its current value equals expected (null meaning "absent"). Returns whether the update happened — the building block for distributed counters/state machines.