|
NGen
|
A writer for one checkpoint event. More...
#include <record_backend.hpp>
Inheritance diagram for ngen::serialization::RecordBackend::Writer:
Collaboration diagram for ngen::serialization::RecordBackend::Writer:Public Member Functions | |
| virtual | ~Writer ()=default |
| virtual auto | write (const RecordView &rv) -> expected< void, BackendError >=0 |
| Append a record to this checkpoint event. | |
| virtual auto | commit () -> expected< void, BackendError >=0 |
Commit the event: flush pending writes, make them durable (under Durability::strict), surface deferred errors, run any collective barriers the backend requires. | |
A writer for one checkpoint event.
Obtained only via RecordBackend::writer(); cannot be constructed standalone or mixed across backends.
|
virtualdefault |
Reimplemented in ngen::serialization::FileBackend::Writer.
|
nodiscardpure virtual |
Commit the event: flush pending writes, make them durable (under Durability::strict), surface deferred errors, run any collective barriers the backend requires.
With Durability::relaxed, durability is best-effort and errors may not surface until the parent backend's finalize() call.
Implemented in ngen::serialization::FileBackend::Writer.
|
nodiscardpure virtual |
Append a record to this checkpoint event.
The caller owns the RecordView's payload bytes for the duration of this call; the writer streams them to storage and does not retain the pointer after returning. Error arm carries a backend-specific diagnostic if the append fails (I/O error, oversized payload, etc.).
Implemented in ngen::serialization::FileBackend::Writer.