Interface OneInputWindowStreamProcessFunction<IN,OUT>
-
- Type Parameters:
IN- The type of the input value.OUT- The type of the output value.
- All Superinterfaces:
org.apache.flink.api.common.functions.Function,ProcessFunction,Serializable,WindowProcessFunction
@Experimental public interface OneInputWindowStreamProcessFunction<IN,OUT> extends WindowProcessFunction
A type ofWindowProcessFunctionfor one-input window processing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidonClear(Collector<OUT> output, PartitionedContext<OUT> ctx, OneInputWindowContext<IN> windowContext)Callback when a window is about to be cleaned up.default voidonLateRecord(IN record, Collector<OUT> output, PartitionedContext<OUT> ctx)This method will be invoked when a record is received after the window has been cleaned.default voidonRecord(IN record, Collector<OUT> output, PartitionedContext<OUT> ctx, OneInputWindowContext<IN> windowContext)This method will be invoked when a record is received.voidonTrigger(Collector<OUT> output, PartitionedContext<OUT> ctx, OneInputWindowContext<IN> windowContext)This method will be invoked when the Window is triggered, you can obtain all the input records in the Window byOneInputWindowContext.getAllRecords().-
Methods inherited from interface org.apache.flink.datastream.api.function.ProcessFunction
close, declareWatermarks, usesStates
-
Methods inherited from interface org.apache.flink.datastream.api.extension.window.function.WindowProcessFunction
useWindowStates
-
-
-
-
Method Detail
-
onRecord
default void onRecord(IN record, Collector<OUT> output, PartitionedContext<OUT> ctx, OneInputWindowContext<IN> windowContext) throws Exception
This method will be invoked when a record is received. Its default behaviors to store data in built-in window state byOneInputWindowContext.putRecord(IN). If the user overrides this method, they have to take care of the input data themselves.- Throws:
Exception
-
onTrigger
void onTrigger(Collector<OUT> output, PartitionedContext<OUT> ctx, OneInputWindowContext<IN> windowContext) throws Exception
This method will be invoked when the Window is triggered, you can obtain all the input records in the Window byOneInputWindowContext.getAllRecords().- Throws:
Exception
-
onClear
default void onClear(Collector<OUT> output, PartitionedContext<OUT> ctx, OneInputWindowContext<IN> windowContext) throws Exception
Callback when a window is about to be cleaned up. It is the time to deletes any state in thewindowContextwhen the Window expires (the event time or processing time passes itsmaxTimestamp+allowedLateness).- Throws:
Exception
-
-