SnapshotMaintenanceOperations

class SnapshotMaintenanceOperations<STATE : AggregateState, EVENT>(aggregate: AggregateStateDefinition<STATE, EVENT>, stateSchemaVersion: AggregateStateSchemaVersion, eventStore: AggregateEventStoreRead<EVENT>, snapshotStore: SnapshotStore<STATE>, retention: SnapshotRetentionPolicy = SnapshotRetentionPolicy.MaxCount(1), clock: Clock = Clock.System)(source)

Explicit operator-facing rebuild, delete, and verification operations for snapshots.

Constructors

Link copied to clipboard
constructor(aggregate: AggregateStateDefinition<STATE, EVENT>, stateSchemaVersion: AggregateStateSchemaVersion, eventStore: AggregateEventStoreRead<EVENT>, snapshotStore: SnapshotStore<STATE>, retention: SnapshotRetentionPolicy = SnapshotRetentionPolicy.MaxCount(1), clock: Clock = Clock.System)
constructor(aggregate: AggregateStateDefinition<STATE, EVENT>, stateSchema: AggregateStateSchema<STATE, *>, eventStore: AggregateEventStoreRead<EVENT>, snapshotStore: SnapshotStore<STATE>, retention: SnapshotRetentionPolicy = SnapshotRetentionPolicy.MaxCount(1), clock: Clock = Clock.System)

Functions

Link copied to clipboard
suspend fun delete(aggregateId: String)
Link copied to clipboard
suspend fun deleteAll()
Link copied to clipboard
suspend fun rebuild(aggregateId: String): SnapshotRebuildResult<STATE>
Link copied to clipboard
suspend fun verify(aggregateId: String): SnapshotVerificationResult