MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
mxl::lib::EventFlowReader Class Referenceabstract

Backend contract for reading complete event entries or fragments in queue order. Each reader has one owning thread; concurrent consumers must use independent readers. More...

#include <EventFlowReader.hpp>

Inheritance diagram for mxl::lib::EventFlowReader:
Collaboration diagram for mxl::lib::EventFlowReader:

Public Member Functions

virtual mxlStatus getEvent (Timepoint deadline, mxlEventInfo *info, std::uint8_t **payload)=0
 Copy the next available entry and advance this reader's cursor.
Public Member Functions inherited from mxl::lib::FlowReader
std::filesystem::path const & getDomain () const
virtual mxlFlowConfigInfo getFlowConfigInfo () const =0
virtual FlowData const & getFlowData () const =0
virtual mxlFlowInfo getFlowInfo () const =0
virtual mxlFlowRuntimeInfo getFlowRuntimeInfo () const =0
uuids::uuid const & getId () const
virtual ~FlowReader ()

Protected Member Functions

 FlowReader (uuids::uuid &&flowId, std::filesystem::path const &domain)
 Initialize flow identity and domain using the base reader constructors.
 FlowReader (uuids::uuid const &flowId, std::filesystem::path const &domain)
 Initialize flow identity and domain using the base reader constructors.
Protected Member Functions inherited from mxl::lib::FlowReader
bool checkPermissions () const
 FlowReader (uuids::uuid &&flowId, std::filesystem::path const &domain)
 FlowReader (uuids::uuid const &flowId, std::filesystem::path const &domain)
virtual bool isFlowValid () const =0

Detailed Description

Backend contract for reading complete event entries or fragments in queue order. Each reader has one owning thread; concurrent consumers must use independent readers.

Definition at line 18 of file EventFlowReader.hpp.

Member Function Documentation

◆ FlowReader() [1/2]

mxl::lib::FlowReader::FlowReader ( uuids::uuid && flowId,
std::filesystem::path const & domain )
explicitprotected

Initialize flow identity and domain using the base reader constructors.

Parameters
flowIdIdentifier of the event flow.
domainDomain directory containing the flow.

Definition at line 84 of file FlowReader.cpp.

12 : _flowId{std::move(flowId)}
13 , _domain{domain}
14 {}
std::filesystem::path _domain
auto const flowId

◆ FlowReader() [2/2]

mxl::lib::FlowReader::FlowReader ( uuids::uuid const & flowId,
std::filesystem::path const & domain )
explicitprotected

Initialize flow identity and domain using the base reader constructors.

Parameters
flowIdIdentifier of the event flow.
domainDomain directory containing the flow.

Definition at line 85 of file FlowReader.cpp.

18 , _domain{domain}
19 {}

◆ getEvent()

virtual mxlStatus mxl::lib::EventFlowReader::getEvent ( Timepoint deadline,
mxlEventInfo * info,
std::uint8_t ** payload )
pure virtual

Copy the next available entry and advance this reader's cursor.

Parameters
deadlineAbsolute realtime deadline for waiting; an expired deadline permits one attempt.
[out]infoMetadata destination, valid on success; must not be null.
[out]payloadReceives private snapshot storage on success; must not be null.
Returns
MXL_STATUS_OK, TOO_EARLY if unavailable by the deadline, TOO_LATE on overwrite, or FLOW_INVALID for corrupt metadata or a detected removed flow.
Note
Snapshot storage is reused by the next read attempt on this handle. Release must be coordinated with callers.

Implemented in mxl::lib::PosixEventFlowReader.


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