InMemoryMapWriteLayer

class InMemoryMapWriteLayer<K, V> : MapWriteLayer<K, V>

Constructors

Link copied to clipboard
fun InMemoryMapWriteLayer()

Functions

Link copied to clipboard
open suspend override fun clear()

Erase everything.

Link copied to clipboard
open suspend override fun get(key: K): V?

Get the value V for the key K if it exists, or return null.

Link copied to clipboard
open suspend override fun getAll(): Map<K, V>

Get all key/value pairs as a map that are currently stored.

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

Remove the key if it exists. Doesn't do anything if the key doesn't exist.

Link copied to clipboard
open suspend override fun reset(to: Map<K, V>)

Wipe out the current state and replace it with to

Link copied to clipboard
open suspend override fun set(key: K, value: V)

Set the value V for key K

Link copied to clipboard
open suspend override fun size(): Int

Get the number of entries.