Interface SyncStateWindowProcessor<W>

    • Method Detail

      • 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 element
        element - The element to process.
        Throws:
        Exception
      • advanceProgress

        void advanceProgress​(long progress)
                      throws Exception
        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

        void prepareCheckpoint()
                        throws Exception
        Performs a preparation before checkpoint. This usually flushes buffered data into state.
        Throws:
        Exception
      • fireWindow

        void fireWindow​(long timerTimestamp,
                        W window)
                 throws Exception
        Emit results of the given window.

        Note: the key context has been set.

        Parameters:
        timerTimestamp - the fired timestamp
        window - the window to emit
        Throws:
        Exception
      • clearWindow

        void clearWindow​(long timerTimestamp,
                         W window)
                  throws Exception
        Clear state and resources associated with the given window namespace.

        Note: the key context has been set.

        Parameters:
        timerTimestamp - the fired timestamp
        window - the window to clear
        Throws:
        Exception