@Internal public interface SlicingWindowProcessor<W> extends Serializable
Modifier and Type | Interface and Description |
---|---|
static interface |
SlicingWindowProcessor.Context<W>
Information available in an invocation of methods of
SlicingWindowProcessor . |
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(W window)
Clear state and resources associated with the given window namespace.
|
void |
close()
The tear-down method of the function.
|
TypeSerializer<W> |
createWindowSerializer()
Returns the serializer of the window type.
|
void |
fireWindow(W window)
Emit results of the given window.
|
void |
initializeWatermark(long watermark)
Initializes the watermark which restores from state.
|
void |
open(SlicingWindowProcessor.Context<W> context)
Initialization method for the function.
|
void |
prepareCheckpoint()
Performs a preparation before checkpoint.
|
boolean |
processElement(RowData key,
RowData element)
Process an element with associated key from the input stream.
|
void open(SlicingWindowProcessor.Context<W> context) throws Exception
Exception
void initializeWatermark(long watermark)
watermark
- the initial watermarkboolean processElement(RowData key, RowData element) throws Exception
key
- the key associated with the elementelement
- The element to process.Exception
void 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 timeException
void prepareCheckpoint() throws Exception
Exception
void fireWindow(W window) throws Exception
Note: the key context has been set.
window
- the window to emitException
void clearWindow(W window) throws Exception
Note: the key context has been set.
window
- the window to clearException
void close() throws Exception
Exception
TypeSerializer<W> createWindowSerializer()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.