trace
suspend fun <S : Any> trace(model: AggregateModel<S>, ref: AggregateRef, fromVersion: Int, toVersion: Int, limit: Int, snapshot: SnapshotRecord? = null, maxReplay: Int = options.maxReplay): List<CommitTrace>
The commits of ref from version fromVersion up to toVersion, at most limit of them, in version order, read-only: each stream with its events, read as the model's current schema, and the state and metadata after it. The state before fromVersion is the one stateAt gives for its version, from snapshot and the tail when it fits, so the log is not replayed from version 1 then; reaching it folds at most maxReplay streams. The state cache is not touched.
Return
the commits, empty when the log holds no version from fromVersion up to toVersion.
Throws
when the state before fromVersion is more than maxReplay streams away.