snapshots

abstract fun <S : Any> snapshots(stateType: Class<S>): SnapshotQueries<S>

The snapshots of the aggregate whose state is of stateType (its root's class when the root is its own state), their rows decoded as Snapshots of it. The node finds the aggregate type from its models.

Throws

when no aggregate of the node has a state of stateType, or this node serves no snapshot query of it.


abstract fun snapshots(type: AggregateType): SnapshotQueries<ObjectNode>

The snapshots of type, their states as stored (ObjectNode): read their fields by the constants of the aggregate's contract.

Throws

when this node serves no snapshot query of type.