load

open override fun load(aggregateId: AggregateId, headVersion: Int, tailVersion: Int): Flux<DomainEventStream>

Loads domain event streams for the specified aggregate within the given version range. Validates that headVersion is non-negative and tailVersion is greater than or equal to headVersion.

Return

a Flux of domain event streams

Parameters

aggregateId

the ID of the aggregate to load events for

headVersion

the starting version (inclusive, must be >= 0)

tailVersion

the ending version (inclusive, must be >= headVersion)

Throws

if headVersion < 0 or tailVersion < headVersion


open override fun load(aggregateId: AggregateId, headEventTime: Long, tailEventTime: Long): Flux<DomainEventStream>

Loads domain event streams for the specified aggregate within the given event time range. Validates that tailEventTime is greater than or equal to headEventTime.

Return

a Flux of domain event streams

Parameters

aggregateId

the ID of the aggregate to load events for

headEventTime

the starting event time (inclusive)

tailEventTime

the ending event time (inclusive, must be >= headEventTime)

Throws

if tailEventTime < headEventTime