Skip to content

Commit

Permalink
[hotfix] Added missing documentation in StateTransformationFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanRRichter committed Mar 17, 2017
1 parent e0614f6 commit 713c092
Showing 1 changed file with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 713c092

Please sign in to comment.