|
NGen
|
A read handle for one restore session. More...
#include <record_backend.hpp>
Inheritance diagram for ngen::serialization::RecordBackend::Reader:
Collaboration diagram for ngen::serialization::RecordBackend::Reader:Public Member Functions | |
| virtual | ~Reader ()=default |
| virtual auto | find_latest (const std::string &id) -> expected< Record, BackendError >=0 |
Return the latest record for id within this Reader's scope. | |
| virtual auto | find_at_step (const std::string &id, int64_t time_step) -> expected< Record, BackendError >=0 |
Return the record for id at the given simulation step. | |
| virtual auto | find_at_simulation_timestamp (const std::string &id, int64_t simulation_timestamp) -> expected< Record, BackendError >=0 |
Return the record for id at the given simulation timestamp (seconds since Unix epoch). | |
| virtual auto | close () -> expected< void, BackendError > |
| Optional explicit close. | |
A read handle for one restore session.
Scoped at construction by an IdPredicate. Obtained only via RecordBackend::reader(); cannot be constructed standalone or mixed across backends. "Not found" is returned on the expected<> error arm as BackendError::Kind::NotFound.
|
virtualdefault |
|
inlinenodiscardvirtual |
Optional explicit close.
Default is a no-op success; backends with fallible read-side teardown override to surface those errors. After a successful close(), subsequent find_* calls have undefined behavior. with_reader calls this automatically on success.
|
nodiscardpure virtual |
Return the record for id at the given simulation timestamp (seconds since Unix epoch).
Multiple records with the same (id, simulation_timestamp) resolve to the latest checkpoint_epoch.
Implemented in ngen::serialization::FileBackend::Reader.
|
nodiscardpure virtual |
Return the record for id at the given simulation step.
Multiple records with the same (id, time_step) resolve to the latest checkpoint_epoch.
Implemented in ngen::serialization::FileBackend::Reader.
|
nodiscardpure virtual |
Return the latest record for id within this Reader's scope.
Ordering: highest time_step first, ties broken by highest checkpoint_epoch (latest write wins).
Implemented in ngen::serialization::FileBackend::Reader.