C++ Actor Framework 0.18
|
A credit controller that estimates the bytes required to store incoming batches and constrains credit based on upper bounds for memory usage. More...
#include <token_based_credit_controller.hpp>
Public Member Functions | |
token_based_credit_controller (local_actor *self) | |
void | before_processing (downstream_msg::batch &batch) override |
Called before processing the batch x in order to allow the controller to keep statistics on incoming batches. | |
calibration | init () override |
Returns an initial calibration for the path. | |
calibration | calibrate () override |
Computes a credit assignment to the source after crossing the low-threshold. | |
virtual void | before_processing (downstream_msg::batch &batch)=0 |
Called before processing the batch x in order to allow the controller to keep statistics on incoming batches. | |
virtual calibration | init ()=0 |
Returns an initial calibration for the path. | |
virtual calibration | calibrate ()=0 |
Computes a credit assignment to the source after crossing the low-threshold. | |
Static Public Member Functions | |
template<class T > | |
static auto | make (local_actor *self, stream< T >) |
Static Public Attributes | |
static constexpr int32_t | min_samples = 50 |
Configures how many samples we require for recalculating buffer sizes. | |
A credit controller that estimates the bytes required to store incoming batches and constrains credit based on upper bounds for memory usage.
|
overridevirtual |
Called before processing the batch x
in order to allow the controller to keep statistics on incoming batches.
Implements caf::credit_controller.
|
overridevirtual |
Computes a credit assignment to the source after crossing the low-threshold.
May assign zero credit.
Implements caf::credit_controller.
|
overridevirtual |
Returns an initial calibration for the path.
Implements caf::credit_controller.