Class WindowReaderFunction<IN,OUT,KEY,W extends org.apache.flink.streaming.api.windowing.windows.Window>
java.lang.Object
org.apache.flink.api.common.functions.AbstractRichFunction
org.apache.flink.state.api.functions.WindowReaderFunction<IN,OUT,KEY,W>
- Type Parameters:
IN- The type of the input value.OUT- The type of the output value.KEY- The type of the key.W- The type ofWindowthat this window function can be applied on.
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction
- Direct Known Subclasses:
EvictingWindowReaderFunction,PassThroughReader
@PublicEvolving
public abstract class WindowReaderFunction<IN,OUT,KEY,W extends org.apache.flink.streaming.api.windowing.windows.Window>
extends org.apache.flink.api.common.functions.AbstractRichFunction
Base abstract class for functions that are evaluated over keyed (grouped) windows using a context
for retrieving extra information.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceWindowReaderFunction.Context<W extends org.apache.flink.streaming.api.windowing.windows.Window>The context holding window metadata. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidreadWindow(KEY key, WindowReaderFunction.Context<W> context, Iterable<IN> elements, org.apache.flink.util.Collector<OUT> out) Evaluates the window and outputs none or several elements.Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
Constructor Details
-
WindowReaderFunction
public WindowReaderFunction()
-
-
Method Details
-
readWindow
public abstract void readWindow(KEY key, WindowReaderFunction.Context<W> context, Iterable<IN> elements, org.apache.flink.util.Collector<OUT> out) throws Exception Evaluates the window and outputs none or several elements.- Parameters:
key- The key for which this window is evaluated.context- The context in which the window is being evaluated.elements- The elements in the window being evaluated.out- A collector for emitting elements.- Throws:
Exception- The function may throw exceptions to fail the program and trigger recovery.
-