InMemoryMutationStore

The default MutationStore: an in-memory map. Mutations enqueued with a MutationCodec are still tracked (so MutationQueue.restore works within the same process, e.g. after recreating a MutationQueue), but everything is lost on process death — use this when you don't need mutations to survive a relaunch, or as a reference implementation when writing a durable one.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open suspend override fun loadAll(): List<MutationRecord>

All currently persisted records, in no particular order.

Link copied to clipboard
open suspend override fun remove(id: String)

Removes the record with the given id, if present.

Link copied to clipboard
open suspend override fun save(record: MutationRecord)

Persists (or overwrites) record.