KeyedStorage

interface KeyedStorage<K : Any, T : Any>

Allows KeyedPhysicalReplica to save data on a persistent storage.

Functions

Link copied to clipboard
abstract suspend fun read(key: K): T?

Read data from a storage for a given key.

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

Remove data in a storage for a given key.

Link copied to clipboard
abstract suspend fun removeAll()

Remove all data in a storage.

Link copied to clipboard
abstract suspend fun write(key: K, data: T)

Write data on a storage for a given key.