Repository: flink Updated Branches: refs/heads/master e0614f655 -> 713c092b2
[hotfix] Added missing documentation in StateTransformationFunction Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/713c092b Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/713c092b Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/713c092b Branch: refs/heads/master Commit: 713c092b2900ab1339da51b57ea10d378a4d2608 Parents: e0614f6 Author: Stefan Richter <[email protected]> Authored: Fri Mar 17 13:45:52 2017 +0100 Committer: Stefan Richter <[email protected]> Committed: Fri Mar 17 13:45:52 2017 +0100 ---------------------------------------------------------------------- .../state/StateTransformationFunction.java | 21 +++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/713c092b/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateTransformationFunction.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateTransformationFunction.java b/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateTransformationFunction.java index 9e12ee5..182b4c8 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateTransformationFunction.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateTransformationFunction.java @@ -18,6 +18,25 @@ package org.apache.flink.runtime.state; +import org.apache.flink.annotation.Internal; + +/** + * 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. + * + * @param <S> type of the previous state that is the bases for the computation of the new state. + * @param <T> type of the element value that is used to compute the change of state. + */ +@Internal public interface StateTransformationFunction<S, T> { + + /** + * Binary function that applies a given value to the given old state to compute the new state. + * + * @param previousState the previous state that is the basis for the transformation. + * @param value the value that the implementation applies to the old state to obtain the new state. + * @return 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. + */ S apply(S previousState, T value) throws Exception; -} +} \ No newline at end of file
