Native, crash-consistent Timeline persistence sink. More...
#include <file_journal.hpp>
Public Member Functions | |
| ~FileJournal () override | |
| Flushes no additional state and releases the file and lifetime locks. | |
| FileJournal (const FileJournal &)=delete | |
| FileJournal & | operator= (const FileJournal &)=delete |
| runtime::Result< bool, JournalSinkError > | append_batch (const JournalEntry &entry) noexcept override |
| Durably appends the entry's resulting canonical snapshot frame. | |
| runtime::Result< bool, JournalSinkError > | checkpoint (const Project &snapshot, DocumentRevision durable_revision) noexcept override |
| Atomically replaces durable history with snapshot at durable_revision. | |
| runtime::Result< bool, JournalSinkError > | validate_restore (const Project &snapshot, DocumentRevision durable_revision) noexcept override |
| Compares snapshot and revision with the sink's recovered durable state. | |
Static Public Member Functions | |
| static runtime::Result< FileJournalOpenResult, FileJournalError > | open (const std::filesystem::path &path, Project fallback, SchemaRegistry registry, const FileJournalLimits &limits={}) |
| Opens, creates, or recovers a journal at path. | |
Native, crash-consistent Timeline persistence sink.
Each committed revision is a checksummed frame containing one canonical snapshot. A trailing partial frame is discarded during recovery; corruption before the trailing frame fails closed. Checkpoints replace the file through a durable temporary sibling and atomic rename. Public operations are synchronous and perform filesystem I/O, so they must not run on an audio thread. A path can have at most one live FileJournal in the process, including aliases that resolve to the same file.
|
override |
Flushes no additional state and releases the file and lifetime locks.
|
delete |
|
overridevirtualnoexcept |
Durably appends the entry's resulting canonical snapshot frame.
Implements pulp::timeline::JournalSink.
|
overridevirtualnoexcept |
Atomically replaces durable history with snapshot at durable_revision.
Implements pulp::timeline::JournalSink.
|
static |
Opens, creates, or recovers a journal at path.
A new or empty journal is initialized from fallback at revision zero. Existing complete frames are validated and the newest snapshot is returned. A torn trailing frame is truncated only after the valid prefix is recovered; non-tail corruption fails closed. registry is retained by value for subsequent canonical serialization.
|
delete |
|
overridevirtualnoexcept |
Compares snapshot and revision with the sink's recovered durable state.
This operation does not truncate or rewrite the file.
Reimplemented from pulp::timeline::JournalSink.