52 virtual std::int32_t
onSnapshot(std::span<std::uint8_t> buffer, std::int32_t recordIndex) = 0;
63 virtual void onRestore(std::span<const std::uint8_t> record, std::int32_t recordIndex,
What a source that takes part in snapshot rounds serializes, and restores from (doc/snapshot....
Definition SnapshotListener.hpp:18
virtual std::vector< std::uint32_t > supportedFormatVersions() const
Lists the formats onRestore reads.
Definition SnapshotListener.hpp:35
virtual std::int32_t onSnapshot(std::span< std::uint8_t > buffer, std::int32_t recordIndex)=0
Encodes the next record of this instance's state as of the round's cut — every frame up to the Snapsh...
virtual std::uint32_t formatVersion() const =0
Names the record format onSnapshot writes, carried in SnapshotEnd::formatVersion and opaque to seqero...
virtual void onRestore(std::span< const std::uint8_t > record, std::int32_t recordIndex, std::uint32_t formatVersion)=0
Decodes the next record of the snapshot this instance restores from, in the order onSnapshot encoded ...
~SnapshotListener()=default
Definition ClusterError.hpp:5
What takes a façade into snapshot rounds: the listener, which must outlive the façade,...
Definition SnapshotListener.hpp:76
std::filesystem::path directory
Definition SnapshotListener.hpp:78
SnapshotListener & listener
Definition SnapshotListener.hpp:77