DefaultLocalRegistryStorage

Default "local" implementation of RegistryStorage which internally uses a mutableMap.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun constructUniqueIdentifier(data: T): String

Constructs a unique key for the given data.

Link copied to clipboard
open override fun entryFlow(): Flow<RegistryStorage.StorageEntry<K, T>>

Creates a flow of all entries in this registry.

Link copied to clipboard
open suspend override fun get(id: K): T?

Reads a value from the registry at the given key.

Link copied to clipboard
open suspend override fun register(data: T)

Lets the registry know about the specified type T, this may store the object in a local map, which is used for reconstructing later.

Link copied to clipboard
open suspend override fun remove(id: K): T?

Deletes a value from the registry with the given key.

Link copied to clipboard
open suspend override fun set(id: K, data: T)

Creates or updates an existing entry at the given unique key.