Resilient
Public Member Functions | Friends | Related Functions | List of all members
resilient::Pipeline< Policies > Class Template Reference

Define a sequence of polices, which will be executed in order. More...

#include <pipeline.hpp>

Public Member Functions

template<typename Policy >
Pipeline< Policies..., Policy > then (Policy &&policy)&
 Create a new Pipeline with a new policy. More...
 
template<typename Policy >
Pipeline< Policies..., Policy > then (Policy &&policy)&&
 
template<typename Callable , typename... Args>
decltype(auto) execute (Callable &&callable, Args &&...args)
 Execute the Task with the arguments. More...
 

Friends

template<typename... T>
class Pipeline
 
template<typename... Policy>
Pipeline< Policy... > pipelineOf (Policy &&...policy)
 

Related Functions

(Note that these are not member functions.)

template<typename... Policies>
Pipeline< Policies... > pipelineOf (Policies &&...policies)
 Create a pipeline of policies. More...
 

Detailed Description

template<typename... Policies>
class resilient::Pipeline< Policies >

Define a sequence of polices, which will be executed in order.

A pipeline of polices runs the task recursively inside a policy. For example, given a pipeline of a RetryPolicy and a RateLimiter, when the pipeline is executed the RetryPolicy is going to retry execution of the RateLimiter with the provided Task.

Template Parameters
Policies...The types of the policies

Member Function Documentation

template<typename... Policies>
template<typename Callable , typename... Args>
decltype(auto) resilient::Pipeline< Policies >::execute ( Callable &&  callable,
Args &&...  args 
)
inline

Execute the Task with the arguments.

Returns
The result of executing the task on all the policies
template<typename... Policies>
template<typename Policy >
Pipeline<Policies..., Policy> resilient::Pipeline< Policies >::then ( Policy &&  policy)
inline

Create a new Pipeline with a new policy.

Parameters
policyThe policy to add.
Returns
The new Pipeline.
template<typename... Policies>
template<typename Policy >
Pipeline<Policies..., Policy> resilient::Pipeline< Policies >::then ( Policy &&  policy)
inline
See also
Pipeline::then

Friends And Related Function Documentation

template<typename... Policies>
Pipeline< Policies... > pipelineOf ( Policies &&...  policies)
related

Create a pipeline of policies.

Parameters
policies...The policies to use in creating the pipeline.
Returns
The pipeline.

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