KvsExtendedEditor

Builder for applying a batch of write operations with optional TTL to the store.

Each put* overload comes in two forms: one without a Duration (no expiry) and one with a Duration (entry expires after the given time). Call commit to flush all staged operations atomically.

See also

Functions

Link copied to clipboard

Stages the removal of ALL entries from the store (including TTL metadata).

Link copied to clipboard
abstract suspend fun commit()

Flushes all staged operations atomically to the underlying storage.

Link copied to clipboard

Stages a Boolean value without TTL under key.

abstract fun putBoolean(key: String, value: Boolean, duration: Duration): KvsExtended.KvsExtendedEditor

Stages a Boolean value with a TTL of duration under key.

Link copied to clipboard

Stages a Float value without TTL under key.

abstract fun putFloat(key: String, value: Float, duration: Duration): KvsExtended.KvsExtendedEditor

Stages a Float value with a TTL of duration under key.

Link copied to clipboard
abstract fun putInt(key: String, value: Int): KvsExtended.KvsExtendedEditor

Stages an Int value without TTL under key.

abstract fun putInt(key: String, value: Int, duration: Duration): KvsExtended.KvsExtendedEditor

Stages an Int value with a TTL of duration under key.

Link copied to clipboard
abstract fun putLong(key: String, value: Long): KvsExtended.KvsExtendedEditor

Stages a Long value without TTL under key.

abstract fun putLong(key: String, value: Long, duration: Duration): KvsExtended.KvsExtendedEditor

Stages a Long value with a TTL of duration under key.

Link copied to clipboard

Stages a String value without TTL under key.

abstract fun putString(key: String, value: String, duration: Duration): KvsExtended.KvsExtendedEditor

Stages a String value with a TTL of duration under key.

Link copied to clipboard

Stages the removal of the entry identified by key.