SharedStateStore

A minimal shared, string-keyed key-value store for cross-instance coordination of resilience state. See file-level docs for intended usage.

Inheritors

RedisSharedStateStore

Functions

Link copied to clipboard
abstract suspend 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.

Link copied to clipboard
abstract suspend fun get(key: String): String?

Reads the current value for key, or null if absent.

Link copied to clipboard
abstract suspend fun remove(key: String)

Removes key, if present.

Link copied to clipboard
abstract suspend fun set(key: String, value: String)

Unconditionally sets key to value.