KernelStateReads
StateReads of the contexts a node serves: the latest state is the snapshot (SnapshotStore, the default read model), else, while an aggregate has none, its log replayed by the context's Kernel from version 1 (Kernel.stateAt, as the write side loads a state without a snapshot) under gate; a state at a version or a time, and a trace, are the log replayed (Kernel.stateAt, Kernel.trace) from the snapshot when it comes before what is asked, else from version 1, under gate too. Every replay but committed's folds the log as it reads it and at most maxReplay streams of it: a read that needs more is refused with StateReplayLimitException.
A snapshot behind the log's head is the latest state as it is: the snapshot is the read model, which the default wait (SNAPSHOT) has caught up before a command's answer. A read that asks for a minimum version (latest of a version) catches a lagging snapshot up with the log instead, under gate and maxReplay too, and waits at most minVersionWait for a version not committed yet. An aggregate whose model registry does not know, or whose context has no ContextReads, is not found, and so is one with no commit. States are trees of Wow's JSON, so a decimal keeps its digits and its scale.
Constructors
Types
What KernelStateReads reads a context from: its kernel and its snapshot store.
Functions
The committed state of ref as of instant: after the last commit at or before it by commit time; null when none had committed by then. Replayed as at a version is.
The committed state of ref at version, or null when the log does not hold that version. Its replay runs under the node's ReplayGate and folds a bounded number of streams: past the bound, it throws StateReplayLimitException.
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).
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.
The commits of ref from version fromVersion up to toVersion, at most limit, in version order, each with its events and the state after it; empty when the log holds none of those versions. Replayed as at a version is, the state before fromVersion included.