KvsStandard

interface KvsStandard

Internal contract for typed read operations on a key-value store.

This interface is part of the KvsStorage internal API. It is NOT intended for direct use by library consumers. Stability is NOT guaranteed across versions.

All operations are suspending and honour structured concurrency — a cancelled coroutine receives CancellationException immediately.

See also

Inheritors

Functions

Link copied to clipboard
abstract suspend fun getAll(): Map<String, Any>

Returns all key-value entries currently held in the store.

Link copied to clipboard
abstract suspend fun getBoolean(key: String, defValue: Boolean): Boolean

Reads the Boolean value stored under key, returning defValue if absent.

Link copied to clipboard
abstract suspend fun getFloat(key: String, defValue: Float): Float

Reads the Float value stored under key, returning defValue if absent.

Link copied to clipboard
abstract suspend fun getInt(key: String, defValue: Int): Int

Reads the Int value stored under key, returning defValue if absent.

Link copied to clipboard
abstract suspend fun getLong(key: String, defValue: Long): Long

Reads the Long value stored under key, returning defValue if absent.

Link copied to clipboard
abstract suspend fun getString(key: String, defValue: String): String

Reads the String value stored under key, returning defValue if absent.