C++ Actor Framework 0.18
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
caf::stream_stage_driver< Input, DownstreamManager > Class Template Referenceabstract

Encapsulates user-provided functionality for generating a stream stage. More...

#include <stream_stage_driver.hpp>

Inheritance diagram for caf::stream_stage_driver< Input, DownstreamManager >:
caf::detail::stream_stage_driver_impl< Input, DownstreamManager, Process, Finalize >

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_
 

Detailed Description

template<class Input, class DownstreamManager>
class caf::stream_stage_driver< Input, DownstreamManager >

Encapsulates user-provided functionality for generating a stream stage.

Member Function Documentation

◆ acquire_credit()

template<class Input , class DownstreamManager >
virtual int32_t caf::stream_stage_driver< Input, DownstreamManager >::acquire_credit ( inbound_path path,
int32_t  desired 
)
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.

◆ finalize()

template<class Input , class DownstreamManager >
virtual void caf::stream_stage_driver< Input, DownstreamManager >::finalize ( const error )
virtual

◆ process()

template<class Input , class DownstreamManager >
virtual void caf::stream_stage_driver< Input, DownstreamManager >::process ( downstream< output_type > &  out,
std::vector< input_type > &  batch 
)
pure virtual

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