RegenerateSnapshotHandler

class RegenerateSnapshotHandler(aggregateMetadata: AggregateMetadata<*, *>, stateAggregateFactory: StateAggregateFactory, eventStore: EventStore, snapshotStore: SnapshotStore)

Constructors

Link copied to clipboard
constructor(aggregateMetadata: AggregateMetadata<*, *>, stateAggregateFactory: StateAggregateFactory, eventStore: EventStore, snapshotStore: SnapshotStore)

Functions

Link copied to clipboard
fun handle(aggregateId: AggregateId): Mono<Snapshot<*>>
Link copied to clipboard
fun regenerate(afterId: String, limit: Int, batchExecutionPolicy: BatchExecutionPolicy): Flux<AggregateId>

Regenerates the snapshots of up to limit aggregates after afterId, batchExecutionPolicy bounding how many run at once; emits each aggregate it went through. A failed aggregate fails the batch with a BatchTaskException naming it.