|
Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
|
Worker-owned sparse index with adaptive thinning and resumable bounded scans. Serialize mutable operations using the existing executor. Lines are never materialized. Empty documents have one empty line; a final separator introduces a trailing empty line. More...
#include <document_source.hpp>
Public Member Functions | |
| ~SparseDocumentIndex () | |
| Release fixed arena and its credit. | |
| DocumentRevision | revision () const noexcept |
| DocumentLinePolicy | policy () const noexcept |
| DocumentIndexProgress | progress () const noexcept |
| DocumentCheckpoint | checkpointBeforeByte (std::uint64_t offset) const noexcept |
| std::expected< DocumentIndexProgress, DocumentError > | advance (ByteDocumentSource &source, std::stop_token stop={}) |
| std::expected< DocumentLineLocation, DocumentError > | locateLine (ByteDocumentSource &source, std::uint64_t line, std::stop_token stop={}) |
Static Public Member Functions | |
| static std::expected< std::unique_ptr< SparseDocumentIndex >, DocumentError > | create (std::shared_ptr< SourceBudget > budget, DocumentRevision revision, DocumentIndexOptions options={}) |
Worker-owned sparse index with adaptive thinning and resumable bounded scans. Serialize mutable operations using the existing executor. Lines are never materialized. Empty documents have one empty line; a final separator introduces a trailing empty line.
| std::expected< DocumentIndexProgress, DocumentError > portals::SparseDocumentIndex::advance | ( | ByteDocumentSource & | source, |
| std::stop_token | stop = {} ) |
| source | Matching source dispatched off its creating thread. |
| stop | Cooperative cancellation. |
|
noexcept |
| offset | Byte anchor. |
|
static |
| budget | Same root as document/views, including this reservation. |
| revision | Exact namespace/provider revision for every scan. |
| options | Checkpoint quota, byte interval and maximum work. |
| std::expected< DocumentLineLocation, DocumentError > portals::SparseDocumentIndex::locateLine | ( | ByteDocumentSource & | source, |
| std::uint64_t | line, | ||
| std::stop_token | stop = {} ) |
| source | Matching seekable source on an existing worker. |
| line | Zero-based requested line; repeated calls resume pending work. |
| stop | Cooperative cancellation. |
|
noexcept |
|
noexcept |
|
noexcept |