SnapshotStore

Store for saving and loading snapshots of state aggregates. Snapshots optimize aggregate loading by providing a recent state checkpoint.

Inheritors

Functions

Link copied to clipboard
open override fun close()

Closes this snapshot store and releases owned resources.

Link copied to clipboard
open fun getVersion(aggregateId: AggregateId): Mono<Int>

Gets the version of the latest snapshot for the specified aggregate. Returns UNINITIALIZED_VERSION if no snapshot exists.

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

Loads the latest snapshot for the specified aggregate.

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

Saves a snapshot to the store.