ReadonlyoptionsValidated immutable cursor options.
ReadonlystoreOrdered storage followed by this cursor.
Number of prefetched fragments currently ready for callers.
Iterate fragments until finality, closure, or failure.
Stop fetching and release pending readers with cancellation.
Schedule fetching before the first next(); safe to call repeatedly.
Reader terminal status, or OK while it is healthy and still running.
Await the next fragment; null is a clean logical end of the sequence.
OptionaltimeoutMs: numberIterate to the clean reader end, yielding one terminal error when needed.
OptionaltimeoutMs: numberAwait end-of-sequence, cancellation, or a store error.
StaticcreateValidate options, create the cursor, and start its lazy fetch pump.
Fair, stackless, prefetching cursor over a ChunkStore.
A reader turns the store's waitable log operations into a simple
next()or async-iterator interface. Ordered mode stops after the final fragment, a clean store closure, or its configured read limit; arrival mode is useful when inspecting interleaved network ingestion. The bounded prefetch buffer lets consumers overlap storage latency without allocating a task or fiber per node.One fetch is in flight at a time, unlike native.
ChunkStoreReaderin C++ keeps 16 behind a reorder buffer, which overlaps the latency of a store that answers slowly. Every store in this library is LocalChunkStore -- in memory, resolving on the microtask queue -- so there is no latency to overlap, and a reorder buffer would add ordering and end-of-sequence cases for a gain that cannot appear. Revisit this if a store with real per-read latency arrives, such as one backed by a fetch.