InMemorySnapshotStore

In-memory implementation of SnapshotStore for testing and development. Stores snapshots as detached JSON trees in a thread-safe map.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val name: String

The name of this repository.

Functions

Link copied to clipboard
open override fun <S : Any> load(aggregateId: AggregateId): Mono<Snapshot<S>>

Loads a snapshot from the in-memory map by deserializing the JSON tree.

Link copied to clipboard
open override fun <S : Any> save(snapshot: Snapshot<S>): Mono<Void>

Saves a snapshot to the in-memory map by serializing it to JSON. The atomic map computation ignores candidates older than the stored snapshot.