Interface SyncStateWindowProcessor<W>
- All Superinterfaces:
Serializable,WindowProcessor<W,SyncStateWindowProcessor.SyncStateContext<W>>
- All Known Subinterfaces:
SlicingSyncStateWindowProcessor<W>,UnslicingSyncStateWindowProcessor<W>
- All Known Implementing Classes:
AbstractSliceSyncStateWindowAggProcessor,AbstractSyncStateWindowAggProcessor,RowTimeSyncStateWindowDeduplicateProcessor,SliceSharedSyncStateWindowAggProcessor,SliceUnsharedSyncStateWindowAggProcessor,SyncStateWindowRankProcessor,UnsliceSyncStateWindowAggProcessor
@Internal
public interface SyncStateWindowProcessor<W>
extends WindowProcessor<W,SyncStateWindowProcessor.SyncStateContext<W>>
A processor that processes elements for windows.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInformation available in an invocation of methods ofSyncStateWindowProcessor.Nested classes/interfaces inherited from interface org.apache.flink.table.runtime.operators.window.tvf.common.WindowProcessor
WindowProcessor.Context<W> -
Method Summary
Modifier and TypeMethodDescriptionvoidadvanceProgress(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.voidclearWindow(long timerTimestamp, W window) Clear state and resources associated with the given window namespace.voidfireWindow(long timerTimestamp, W window) Emit results of the given window.voidPerforms a preparation before checkpoint.booleanprocessElement(org.apache.flink.table.data.RowData key, org.apache.flink.table.data.RowData element) Process an element with associated key from the input stream.Methods inherited from interface org.apache.flink.table.runtime.operators.window.tvf.common.WindowProcessor
close, createWindowSerializer, initializeWatermark, open
-
Method Details
-
processElement
boolean processElement(org.apache.flink.table.data.RowData key, org.apache.flink.table.data.RowData element) throws Exception Process an element with associated key from the input stream. Returns true if this element is dropped because of late arrival.- Parameters:
key- the key associated with the elementelement- The element to process.- Throws:
Exception
-
advanceProgress
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.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.
- Parameters:
progress- the current progress time- Throws:
Exception
-
prepareCheckpoint
Performs a preparation before checkpoint. This usually flushes buffered data into state.- Throws:
Exception
-
fireWindow
Emit results of the given window.Note: the key context has been set.
- Parameters:
timerTimestamp- the fired timestampwindow- the window to emit- Throws:
Exception
-
clearWindow
Clear state and resources associated with the given window namespace.Note: the key context has been set.
- Parameters:
timerTimestamp- the fired timestampwindow- the window to clear- Throws:
Exception
-