Snapshot

Represents a snapshot of a state aggregate at a specific point in time. Snapshots are used to optimize loading by providing a starting point for event replay.

Parameters

S

the type of the state

Inheritors

Properties

Link copied to clipboard
abstract override val aggregateId: AggregateId

The unique identifier of this aggregate.

Link copied to clipboard
abstract val deleted: Boolean
Link copied to clipboard
abstract val eventId: String
Link copied to clipboard
abstract val eventTime: Long
Link copied to clipboard

The expected version for the next event to be applied.

Link copied to clipboard
abstract val firstEventTime: Long
Link copied to clipboard
abstract val firstOperator: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val operator: String
Link copied to clipboard
abstract val ownerId: String
Link copied to clipboard
abstract val snapshotTime: Long
Link copied to clipboard
abstract val spaceId: SpaceId
Link copied to clipboard
abstract val state: S
Link copied to clipboard
abstract override val version: Int

The current version of this aggregate's state.

Functions

Link copied to clipboard
fun <S : Any, D : Any> Snapshot<S>.materialize(materialize: (S) -> D): MaterializedSnapshot<D>
Link copied to clipboard
fun AggregateIdCapable.toGroupKey(parallelism: Int = DEFAULT_PARALLELISM): Int

Computes a grouping key for parallel processing based on the aggregate ID.

Link copied to clipboard
Link copied to clipboard