resumableTransform overloads

Synopses

Declared in <folly/channels/Transform.h>

This overload accepts arguments in the form of a transformer object. The transformer object must have the following functions:

template<
    typename InitializeArg,
    typename TransformerType,
    typename ReceiverType = ::StorageType::second_type,
    typename InputValueType = ReceiverType::ValueType,
    typename OutputValueType = ::value_type>
Receiver<OutputValueType>
resumableTransform(
    InitializeArg initializeArg,
    TransformerType transformer);

This function is similar to the above transform function. However, instead of taking a single input receiver, it takes an initialization function that accepts a value of type InitializeArg, and returns a std::pair<std::vector<OutputValueType>, Receiver<InputValueType>>.

template<
    typename InitializeArg,
    typename InitializeTransformFunc,
    typename TransformValueFunc,
    typename ReceiverType = std::invoke_result_t<InitializeTransformFunc, InitializeArg>::StorageType::second_type,
    typename InputValueType = ReceiverType::ValueType,
    typename OutputValueType = std::invoke_result_t<TransformValueFunc, Try<InputValueType>>::value_type>
Receiver<OutputValueType>
resumableTransform(
    folly::Executor::KeepAlive<folly::SequencedExecutor> executor,
    InitializeArg initializeArg,
    InitializeTransformFunc initializeTransform,
    TransformValueFunc transformValue,
    std::shared_ptr<RateLimiter> rateLimiter = nullptr);

Return Value

An output receiver yielding the transformed values.

Parameters

Name

Description

initializeArg

The initial argument passed to the transformer's initializeTransform function.

transformer

The transformer object described above.

executor

A folly::SequencedExecutor used to transform the values.

initializeTransform

The InitializeTransform function as described above.

transformValue

The TransformValue function as described above.

rateLimiter

An optional rate limiter. If specified, the given rate limiter will limit the number of transformation functions that are simultaneously running.

Created with MrDocs