@Internal public interface WindowProcessor<W> extends Serializable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
WindowProcessor.Context<W>
Information available in an invocation of methods of
WindowProcessor. |
| Modifier and Type | Method and Description |
|---|---|
void |
advanceProgress(long progress)
Advances the progress time, the progress time is watermark if working in event-time mode, or
current processing time if working in processing-time mode.
|
void |
clearWindow(long timerTimestamp,
W window)
Clear state and resources associated with the given window namespace.
|
void |
close()
The tear-down method of the function.
|
org.apache.flink.api.common.typeutils.TypeSerializer<W> |
createWindowSerializer()
Returns the serializer of the window type.
|
void |
fireWindow(long timerTimestamp,
W window)
Emit results of the given window.
|
void |
initializeWatermark(long watermark)
Initializes the watermark which restores from state.
|
void |
open(WindowProcessor.Context<W> context)
Initialization method for the function.
|
void |
prepareCheckpoint()
Performs a preparation before checkpoint.
|
boolean |
processElement(org.apache.flink.table.data.RowData key,
org.apache.flink.table.data.RowData element)
Process an element with associated key from the input stream.
|
void open(WindowProcessor.Context<W> context) throws Exception
Exceptionvoid initializeWatermark(long watermark)
watermark - the initial watermarkboolean processElement(org.apache.flink.table.data.RowData key,
org.apache.flink.table.data.RowData element)
throws Exception
key - the key associated with the elementelement - The element to process.Exceptionvoid advanceProgress(long progress)
throws Exception
This will potentially flush buffered data into states, because the watermark advancement may be in a very small step, but we don't need to flush buffered data for every watermark advancement.
progress - the current progress timeExceptionvoid prepareCheckpoint()
throws Exception
Exceptionvoid fireWindow(long timerTimestamp,
W window)
throws Exception
Note: the key context has been set.
timerTimestamp - the fired timestampwindow - the window to emitExceptionvoid clearWindow(long timerTimestamp,
W window)
throws Exception
Note: the key context has been set.
timerTimestamp - the fired timestampwindow - the window to clearExceptionvoid close()
throws Exception
Exceptionorg.apache.flink.api.common.typeutils.TypeSerializer<W> createWindowSerializer()
Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.