Bounded, replayable in-memory log of contiguous document revisions. More...
#include <journal.hpp>
Public Member Functions | |
| CommandJournal (JournalLimits limits) | |
| Creates an empty revision-zero journal with fixed quotas. | |
| runtime::Result< Project, TransactionError > | replay (const Project &checkpoint, DocumentRevision checkpoint_revision) const |
| Deterministically applies all entries after the supplied checkpoint. | |
| std::span< const JournalEntry > | entries () const noexcept |
| Returns the retained suffix in revision order. | |
| std::size_t | retained_bytes () const noexcept |
| Returns the saturated retained-size accounting for entries. | |
| std::size_t | command_count () const noexcept |
| Returns the total number of command envelopes in retained entries. | |
| DocumentRevision | base_revision () const noexcept |
| Returns the revision of the checkpoint preceding entries(). | |
Friends | |
| class | detail::JournalAccess |
Bounded, replayable in-memory log of contiguous document revisions.
The journal owns its entries and, after its first append, the checkpoint snapshot needed to validate replay. Public inspection views remain valid until the journal is mutated or destroyed. DocumentSession serializes all mutation; a standalone CommandJournal is not internally synchronized.
|
inlineexplicit |
Creates an empty revision-zero journal with fixed quotas.
|
inlinenoexcept |
Returns the revision of the checkpoint preceding entries().
|
inlinenoexcept |
Returns the total number of command envelopes in retained entries.
|
inlinenoexcept |
Returns the retained suffix in revision order.
| runtime::Result< Project, TransactionError > pulp::timeline::CommandJournal::replay | ( | const Project & | checkpoint, |
| DocumentRevision | checkpoint_revision ) const |
Deterministically applies all entries after the supplied checkpoint.
The checkpoint revision and, when retained, snapshot must match the journal base. Replay verifies contiguous revisions, writer-scoped transaction and command monotonicity, model validity, and exact DirtySet reproduction.
|
inlinenoexcept |
Returns the saturated retained-size accounting for entries.
|
friend |