Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
corium::wire::EventJournalReader< EventVariant > Class Template Reference

Zero-heap event journal reader and deterministic player into Corium EventSinks. More...

#include <EventJournal.hpp>

+ Collaboration diagram for corium::wire::EventJournalReader< EventVariant >:

Public Member Functions

 EventJournalReader (std::span< const uint8_t > journalData) noexcept
 Construct reader over a byte span.
 
bool isValid () const noexcept
 Returns true if the journal header is valid (magic, version, schema match).
 
template<typename Sink >
size_t replayInto (Sink &sink) noexcept
 Replay all valid records in the journal directly into an EventSink.
 
void rewind () noexcept
 Rewind playback cursor to the first record.
 
size_t totalRecords () const noexcept
 Total number of records declared in the header.
 

Detailed Description

template<typename EventVariant>
class corium::wire::EventJournalReader< EventVariant >

Zero-heap event journal reader and deterministic player into Corium EventSinks.

Template Parameters
EventVariantVariant of supported event types.

Constructor & Destructor Documentation

◆ EventJournalReader()

template<typename EventVariant >
corium::wire::EventJournalReader< EventVariant >::EventJournalReader ( std::span< const uint8_t >  journalData)
inlineexplicitnoexcept

Construct reader over a byte span.

Member Function Documentation

◆ isValid()

template<typename EventVariant >
bool corium::wire::EventJournalReader< EventVariant >::isValid ( ) const
inlinenoexcept

Returns true if the journal header is valid (magic, version, schema match).

◆ replayInto()

template<typename EventVariant >
template<typename Sink >
size_t corium::wire::EventJournalReader< EventVariant >::replayInto ( Sink &  sink)
inlinenoexcept

Replay all valid records in the journal directly into an EventSink.

Template Parameters
SinkEventSink or EventBus handle type.
Parameters
sinkTarget sink to receive replayed events.
Returns
Number of events successfully replayed.
+ Here is the call graph for this function:

◆ rewind()

template<typename EventVariant >
void corium::wire::EventJournalReader< EventVariant >::rewind ( )
inlinenoexcept

Rewind playback cursor to the first record.

+ Here is the caller graph for this function:

◆ totalRecords()

template<typename EventVariant >
size_t corium::wire::EventJournalReader< EventVariant >::totalRecords ( ) const
inlinenoexcept

Total number of records declared in the header.


The documentation for this class was generated from the following file: