Package org.apache.flink.runtime.state
Interface StateTransformationFunction<S,T>
- Type Parameters:
S- type of the previous state that is the bases for the computation of the new state.T- type of the element value that is used to compute the change of state.
@Internal
public interface StateTransformationFunction<S,T>
Interface for a binary function that is used for push-down of state transformation into state
backends. The function takes as inputs the old state and an element. From those inputs, the
function computes the new state.
-
Method Summary
-
Method Details
-
apply
Binary function that applies a given value to the given old state to compute the new state.- Parameters:
previousState- the previous state that is the basis for the transformation.value- the value that the implementation applies to the old state to obtain the new state.- Returns:
- the new state, computed by applying the given value on the given old state.
- Throws:
Exception- if something goes wrong in applying the transformation function.
-