C++ Actor Framework 0.18
|
Encapsulates user-provided functionality for generating a stream stage. More...
#include <stream_stage_driver.hpp>
Public Types | |
using | input_type = Input |
Element type of the input stream. | |
using | downstream_manager_type = DownstreamManager |
Policy for distributing data to outbound paths. | |
using | output_type = typename downstream_manager_type::output_type |
Element type of the output stream. | |
using | stream_type = stream< output_type > |
Type of the output stream. | |
using | stage_type = stream_stage< input_type, DownstreamManager > |
Implemented stream_stage interface. | |
using | stage_ptr_type = intrusive_ptr< stage_type > |
Smart pointer to the interface type. | |
Public Member Functions | |
stream_stage_driver (DownstreamManager &out) | |
virtual void | process (downstream< output_type > &out, std::vector< input_type > &batch)=0 |
Processes a single batch. | |
virtual void | finalize (const error &) |
Cleans up any state. | |
virtual int32_t | acquire_credit (inbound_path *path, int32_t desired) |
Acquires credit on an inbound path. | |
Protected Attributes | |
DownstreamManager & | out_ |
Encapsulates user-provided functionality for generating a stream stage.
|
virtual |
Acquires credit on an inbound path.
The calculated credit to fill our queue for two cycles is desired
, but the driver is allowed to return any non-negative value.
|
virtual |
Cleans up any state.
Reimplemented in caf::detail::stream_stage_driver_impl< Input, DownstreamManager, Process, Finalize >.
|
pure virtual |
Processes a single batch.
Implemented in caf::detail::stream_stage_driver_impl< Input, DownstreamManager, Process, Finalize >.