Explicit source-owning provisional batch, confined to its creating worker. Read pages can outlive the batch, but must not be published before successful seal. Destruction closes the backend before returning metadata credit; it performs no I/O validation and cannot turn an abandoned batch into a committed result.
More...
#include <document_source.hpp>
|
|
static constexpr std::size_t | READ_BATCH_METADATA_BYTES = 4096 |
| | Held only by an actual supported batch.
|
Explicit source-owning provisional batch, confined to its creating worker. Read pages can outlive the batch, but must not be published before successful seal. Destruction closes the backend before returning metadata credit; it performs no I/O validation and cannot turn an abandoned batch into a committed result.
◆ DocumentReadBatch()
| portals::DocumentReadBatch::DocumentReadBatch |
( |
DocumentReadBatch && | other | ) |
|
|
defaultnoexcept |
- Parameters
-
| other | Worker-local ownership transferred without allocation. |
◆ create()
- Parameters
-
| source | Strong existing source; its creating UI thread is rejected. |
| stop | Cooperative cancellation, also checked after provider callbacks. |
- Returns
- Worker-owned batch with captured qualified metadata, or typed failure.
◆ metadata()
- Returns
- Borrowed captured metadata, valid until this batch moves or dies; no provider I/O.
◆ operator=()
- Parameters
-
| other | Replacement worker-local batch. |
- Returns
- This owner after safely releasing old storage.
◆ read()
- Parameters
-
| request | Exact captured revision, source namespace and bounded byte window. |
| stop | Cooperative cancellation; late cancellation discards the provisional page. |
- Returns
- Owning provisional page, or the first batch failure. Wrong-thread calls never mutate the batch.
◆ seal()
| std::expected< void, DocumentError > portals::DocumentReadBatch::seal |
( |
std::stop_token | stop = {} | ) |
|
- Parameters
-
| stop | Cooperative cancellation of final validation. |
- Returns
- Success qualifying preceding pages, or the first failure; a successful batch is single-use.
The documentation for this class was generated from the following file: