latest

abstract suspend fun latest(ref: AggregateRef): Snapshot<JsonNode>?

The latest state of ref: the one the read model holds, else, before its first snapshot is written (or with its snapshots off), the state its log holds; null when no commit of ref is known. A read that replays the log runs under the node's ReplayGate (its log store's query bulkhead).


abstract suspend fun latest(ref: AggregateRef, minVersion: Int): Snapshot<JsonNode>?

The latest state of ref at version minVersion or later (read your writes): its snapshot when it has reached minVersion, else its log replayed from the snapshot to its head, as at a version is; and while the log too is below minVersion (the command has not committed yet), read again until a bounded wait runs out.

Throws

when the aggregate stays below minVersion through the wait.