Backend contract for a single event producer with private write staging. Callers guarantee one writer per flow across all instances and processes, and serialize the complete open/edit/commit-or-cancel transaction.
More...
#include <EventFlowWriter.hpp>
|
| | 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.
|
| bool | checkPermissions () const |
| | FlowWriter (uuids::uuid &&flowId, std::filesystem::path const &domain) |
| | FlowWriter (uuids::uuid const &flowId, std::filesystem::path const &domain) |
Backend contract for a single event producer with private write staging. Callers guarantee one writer per flow across all instances and processes, and serialize the complete open/edit/commit-or-cancel transaction.
Definition at line 18 of file EventFlowWriter.hpp.
◆ cancel()
| virtual mxlStatus mxl::lib::EventFlowWriter::cancel |
( |
| ) |
|
|
pure virtual |
Discard an open write without advancing the queue or timestamp.
- Returns
- MXL_STATUS_OK, or MXL_ERR_INVALID_ARG when no write is open.
Implemented in mxl::lib::PosixEventFlowWriter.
◆ commit()
Publish the staged bytes as one complete event or fragment.
- Parameters
-
| info | Valid metadata whose timestamp is at least the last committed timestamp. |
- Returns
- MXL_STATUS_OK on publication, INVALID_ARG on invalid metadata or state, FLOW_INVALID on interrupted-tag reuse, or TOO_LATE on index exhaustion.
- Note
- Failure leaves the transaction open for correction or cancellation.
Implemented in mxl::lib::PosixEventFlowWriter.
◆ FlowWriter() [1/2]
Initialize flow identity and domain using the base writer constructors.
- Parameters
-
| flowId | Identifier of the event flow. |
| domain | Domain directory containing the flow. |
Definition at line 87 of file FlowWriter.cpp.
12 {}
std::filesystem::path _domain
◆ FlowWriter() [2/2]
Initialize flow identity and domain using the base writer constructors.
- Parameters
-
| flowId | Identifier of the event flow. |
| domain | Domain directory containing the flow. |
Definition at line 88 of file FlowWriter.cpp.
◆ openEvent()
Begin a write and reset metadata to the event defaults.
- Parameters
-
| [out] | info | Receives initialized metadata; must not be null. |
| [out] | payload | Receives private writable storage; must not be null. |
- Returns
- MXL_STATUS_OK, or MXL_ERR_INVALID_ARG if a write is already open.
- See also
- mxlFlowWriterOpenEvent for field defaults and payload lifetime.
Implemented in mxl::lib::PosixEventFlowWriter.
The documentation for this class was generated from the following file: