|
MXL : Media eXchange Layer
MXL
|
POSIX single-producer writer with private staging and monotonic timestamps. The caller guarantees one writer per flow and serializes transactions; readers may run concurrently. More...
#include <PosixEventFlowWriter.hpp>


Public Member Functions | |
| virtual mxlStatus | cancel () override |
| Discard an open write without advancing the queue or timestamp. | |
| virtual mxlStatus | commit (mxlEventInfo const &info) override |
| Publish the staged bytes as one complete event or fragment. | |
| virtual mxlFlowConfigInfo | getFlowConfigInfo () const override |
| virtual FlowData const & | getFlowData () const override |
| virtual FlowData & | getFlowData () override |
| virtual mxlFlowInfo | getFlowInfo () const override |
| virtual mxlFlowRuntimeInfo | getFlowRuntimeInfo () const override |
| virtual bool | isExclusive () const override |
| virtual bool | makeExclusive () override |
| virtual mxlStatus | openEvent (mxlEventInfo *info, std::uint8_t **payload) override |
| Begin a write and reset metadata to the event defaults. | |
| PosixEventFlowWriter (FlowManager const &manager, uuids::uuid const &flowId, std::unique_ptr< EventFlowData > &&data, std::shared_ptr< DomainWatcher > const &watcher) | |
| Attach the sole writer, recover an interrupted publication and restore timestamp ordering. | |
| virtual | ~PosixEventFlowWriter () override |
| Unregister from the watcher and release mappings and the common flow lock. | |
| Public Member Functions inherited from mxl::lib::FlowWriter | |
| uuids::uuid const & | getId () const |
| virtual | ~FlowWriter () |
Private Attributes | |
| std::unique_ptr< EventFlowData > | _flowData |
| Owns common metadata, ring mappings and the common flow lock. | |
| std::uint64_t | _lastTimestamp |
| Last committed timestamp, restored from the ring on attachment. | |
| bool | _open |
| True while one caller-owned write transaction is open. | |
| std::vector< std::uint8_t > | _payload |
| Private staging buffer; publication copies only eventSize bytes. | |
| std::shared_ptr< DomainWatcher > | _watcher |
| Watcher kept alive while the writer is registered. | |
Additional Inherited Members | |
| Protected Member Functions inherited from mxl::lib::EventFlowWriter | |
| FlowWriter (uuids::uuid &&flowId, std::filesystem::path const &domain) | |
| Initialize flow identity and domain using the base writer constructors. | |
| FlowWriter (uuids::uuid const &flowId, std::filesystem::path const &domain) | |
| Initialize flow identity and domain using the base writer constructors. | |
| Protected Member Functions inherited from mxl::lib::FlowWriter | |
| bool | checkPermissions () const |
| FlowWriter (uuids::uuid &&flowId, std::filesystem::path const &domain) | |
| FlowWriter (uuids::uuid const &flowId, std::filesystem::path const &domain) | |
POSIX single-producer writer with private staging and monotonic timestamps. The caller guarantees one writer per flow and serializes transactions; readers may run concurrently.
Definition at line 21 of file PosixEventFlowWriter.hpp.
| mxl::lib::PosixEventFlowWriter::PosixEventFlowWriter | ( | FlowManager const & | manager, |
| uuids::uuid const & | flowId, | ||
| std::unique_ptr< EventFlowData > && | data, | ||
| std::shared_ptr< DomainWatcher > const & | watcher ) |
Attach the sole writer, recover an interrupted publication and restore timestamp ordering.
| manager | Manager supplying the flow domain. |
| flowId | Identifier of the mapped flow. |
| data | Event mappings whose ownership transfers to this writer. |
| watcher | Shared watcher used for reader access notifications. |
| std::runtime_error | The retained head or next published entry is invalid. |
| std::exception | Allocation or watcher registration fails. |
Definition at line 22 of file PosixEventFlowWriter.cpp.
|
overridevirtual |
Unregister from the watcher and release mappings and the common flow lock.
Definition at line 73 of file PosixEventFlowWriter.cpp.
|
overridevirtual |
Discard an open write without advancing the queue or timestamp.
Implements mxl::lib::EventFlowWriter.
Definition at line 142 of file PosixEventFlowWriter.cpp.
|
overridevirtual |
Publish the staged bytes as one complete event or fragment.
| info | Valid metadata whose timestamp is at least the last committed timestamp. |
Implements mxl::lib::EventFlowWriter.
Definition at line 172 of file PosixEventFlowWriter.cpp.
|
overridevirtual |
Implements mxl::lib::FlowWriter.
Definition at line 108 of file PosixEventFlowWriter.cpp.
|
overridevirtual |
Implements mxl::lib::FlowWriter.
Definition at line 94 of file PosixEventFlowWriter.cpp.
|
overridevirtual |
Implements mxl::lib::FlowWriter.
Definition at line 85 of file PosixEventFlowWriter.cpp.
|
overridevirtual |
Implements mxl::lib::FlowWriter.
Definition at line 103 of file PosixEventFlowWriter.cpp.
|
overridevirtual |
Implements mxl::lib::FlowWriter.
Definition at line 113 of file PosixEventFlowWriter.cpp.
|
overridevirtual |
Implements mxl::lib::FlowWriter.
Definition at line 152 of file PosixEventFlowWriter.cpp.
|
overridevirtual |
Implements mxl::lib::FlowWriter.
Definition at line 162 of file PosixEventFlowWriter.cpp.
|
overridevirtual |
Begin a write and reset metadata to the event defaults.
| [out] | info | Receives initialized metadata; must not be null. |
| [out] | payload | Receives private writable storage; must not be null. |
Implements mxl::lib::EventFlowWriter.
Definition at line 118 of file PosixEventFlowWriter.cpp.
|
private |
Owns common metadata, ring mappings and the common flow lock.
Definition at line 60 of file PosixEventFlowWriter.hpp.
|
private |
Last committed timestamp, restored from the ring on attachment.
Definition at line 63 of file PosixEventFlowWriter.hpp.
|
private |
True while one caller-owned write transaction is open.
Definition at line 62 of file PosixEventFlowWriter.hpp.
|
private |
Private staging buffer; publication copies only eventSize bytes.
Definition at line 64 of file PosixEventFlowWriter.hpp.
|
private |
Watcher kept alive while the writer is registered.
Definition at line 65 of file PosixEventFlowWriter.hpp.