![]() |
dfx 0.1.0
Linux-based dynamic dataflow executor
|
Hook interface invoked around message enqueue in an dfx::Core::Channel. More...
#include <dfx-hooks/Delivery.hpp>
Public Types | |
| enum class | HookResult { Proceed , Skip , Fail } |
| Result code controlling pushMessage() behavior. More... | |
Public Member Functions | |
| virtual HookResult | preDelivery (Core::NodePtr src, Core::OutputPort const &out, Core::NodePtr dst, Core::InputPort &in, Core::MessagePtr &message)=0 |
| Called before a message is enqueued into the channel. | |
| virtual HookResult | postDelivery (Core::NodePtr src, Core::OutputPort const &out, Core::NodePtr dst, Core::InputPort &in)=0 |
| Called after a message has been enqueued into the channel. | |
Hook interface invoked around message enqueue in an dfx::Core::Channel.
The dfx runtime transports messages from an output port to an input port through channels. Delivery hooks are invoked by dfx::Core::Channel::pushMessage() around the enqueue operation:
In this context, "delivery" means "accepted into the channel queue", not "consumed" nor "processed" by the destination node.
Hooks are not invoked when:
|
strong |
Result code controlling pushMessage() behavior.
This enum is interpreted by dfx::Core::Channel::pushMessage() as follows:
|
pure virtual |
Called after a message has been enqueued into the channel.
This callback indicates that the message was accepted into the channel queue. It does not imply that the destination node has consumed or processed the message yet.
| src | Source node owning the output port. |
| out | Output port from which the message originates. |
| dst | Destination node owning the input port. |
| in | Input port that will receive the message (via the channel). |
Implemented in dfx::Runtime::Scheduler.
|
pure virtual |
Called before a message is enqueued into the channel.
message.| src | Source node owning the output port. |
| out | Output port from which the message originates. |
| dst | Destination node owning the input port. |
| in | Input port that will receive the message (via the channel). |
| message | Message being pushed. |
Implemented in dfx::Runtime::Scheduler.