SimpleSnapshotStrategy

Simple implementation of SnapshotStrategy that creates a snapshot for every state event. This strategy saves a snapshot immediately after each state event is processed.

Parameters

snapshotRepository

the repository to save snapshots to

Constructors

Link copied to clipboard
constructor(snapshotRepository: SnapshotRepository)

Functions

Link copied to clipboard

Wraps a SnapshotStrategy with metrics collection capabilities. Returns a MetricSnapshotStrategy that collects metrics on snapshot strategy operations.

Link copied to clipboard
open override fun onEvent(stateEventExchange: StateEventExchange<*>): Mono<Void>

Handles a state event by creating and saving a snapshot.