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 Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Information available in an invocation of methods of SyncStateWindowProcessor.

    Nested classes/interfaces inherited from interface org.apache.flink.table.runtime.operators.window.tvf.common.WindowProcessor

    WindowProcessor.Context<W>
  • Method Summary

    Modifier and Type
    Method
    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
    fireWindow(long timerTimestamp, W window)
    Emit results of the given window.
    void
    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.

    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 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