Class ProcessingTimeTriggers.AfterEndOfWindow<W extends Window>

java.lang.Object
org.apache.flink.table.runtime.operators.window.groupwindow.triggers.Trigger<W>
org.apache.flink.table.runtime.operators.window.groupwindow.triggers.WindowTrigger<W>
org.apache.flink.table.runtime.operators.window.groupwindow.triggers.ProcessingTimeTriggers.AfterEndOfWindow<W>
All Implemented Interfaces:
Serializable
Enclosing class:
ProcessingTimeTriggers

public static final class ProcessingTimeTriggers.AfterEndOfWindow<W extends Window> extends WindowTrigger<W>
A Trigger that fires once the current system time passes the end of the window to which a pane belongs.
See Also:
  • Constructor Details

    • AfterEndOfWindow

      public AfterEndOfWindow()
  • Method Details

    • withEarlyFirings

      public ProcessingTimeTriggers.AfterEndOfWindowNoLate<W> withEarlyFirings(Trigger<W> earlyFirings)
      Creates a new Trigger like the this, except that it fires repeatedly whenever the given Trigger fires before the processing time has passed the end of the window.
    • open

      public void open(Trigger.TriggerContext ctx) throws Exception
      Description copied from class: Trigger
      Initialization method for the trigger. Creates states in this method.
      Specified by:
      open in class Trigger<W extends Window>
      Parameters:
      ctx - A context object that can be used to get states.
      Throws:
      Exception
    • onElement

      public boolean onElement(Object element, long timestamp, W window) throws Exception
      Description copied from class: Trigger
      Called for every element that gets added to a pane. The result of this will determine whether the pane is evaluated to emit results.
      Specified by:
      onElement in class Trigger<W extends Window>
      Parameters:
      element - The element that arrived.
      timestamp - The timestamp of the element that arrived.
      window - The window to which the element is being added.
      Returns:
      true for firing the window, false for no action
      Throws:
      Exception
    • onProcessingTime

      public boolean onProcessingTime(long time, W window) throws Exception
      Description copied from class: Trigger
      Called when a processing-time timer that was set using the trigger context fires.

      Note: This method is not called in case the window does not contain any elements. Thus, if you return PURGE from a trigger method and you expect to do cleanup in a future invocation of a timer callback it might be wise to clean any state that you would clean in the timer callback.

      Specified by:
      onProcessingTime in class Trigger<W extends Window>
      Parameters:
      time - The timestamp at which the timer fired.
      window - The window for which the timer fired.
      Returns:
      true for firing the window, false for no action
      Throws:
      Exception
    • onEventTime

      public boolean onEventTime(long time, W window) throws Exception
      Description copied from class: Trigger
      Called when an event-time timer that was set using the trigger context fires.

      Note: This method is not called in case the window does not contain any elements. Thus, if you return PURGE from a trigger method and you expect to do cleanup in a future invocation of a timer callback it might be wise to clean any state that you would clean in the timer callback.

      Specified by:
      onEventTime in class Trigger<W extends Window>
      Parameters:
      time - The timestamp at which the timer fired.
      window - The window for which the timer fired.
      Returns:
      true for firing the window, false for no action
      Throws:
      Exception
    • clear

      public void clear(W window) throws Exception
      Description copied from class: Trigger
      Clears any state that the trigger might still hold for the given window. This is called when a window is purged. Timers set using Trigger.TriggerContext.registerEventTimeTimer(long) and Trigger.TriggerContext.registerProcessingTimeTimer(long) should be deleted here as well as state acquired using TriggerContext#getPartitionedState(StateDescriptor).
      Specified by:
      clear in class Trigger<W extends Window>
      Throws:
      Exception
    • canMerge

      public boolean canMerge()
      Description copied from class: Trigger
      Returns true if this trigger supports merging of trigger state and can therefore.

      If this returns true you must properly implement Trigger.onMerge(Window, OnMergeContext)

      Overrides:
      canMerge in class Trigger<W extends Window>
    • onMerge

      public void onMerge(W window, Trigger.OnMergeContext mergeContext) throws Exception
      Description copied from class: Trigger
      Called when several windows have been merged into one window by the WindowAssigner.
      Overrides:
      onMerge in class Trigger<W extends Window>
      Parameters:
      window - The new window that results from the merge.
      Throws:
      Exception
    • toString

      public String toString()
      Overrides:
      toString in class Object