java.lang.Object
java.lang.Enum<TriggerResult>
org.apache.flink.streaming.api.windowing.triggers.TriggerResult
All Implemented Interfaces:
Serializable, Comparable<TriggerResult>

public enum TriggerResult extends Enum<TriggerResult>
Result type for trigger methods. This determines what happens with the window, for example whether the window function should be called, or the window should be discarded.

If a Trigger returns FIRE or FIRE_AND_PURGE but the window does not contain any data the window function will not be invoked, i.e. no data will be produced for the window.

  • Enum Constant Details

    • CONTINUE

      public static final TriggerResult CONTINUE
      No action is taken on the window.
    • FIRE_AND_PURGE

      public static final TriggerResult FIRE_AND_PURGE
      FIRE_AND_PURGE evaluates the window function and emits the window result.
    • FIRE

      public static final TriggerResult FIRE
      On FIRE, the window is evaluated and results are emitted. The window is not purged, though, all elements are retained.
    • PURGE

      public static final TriggerResult PURGE
      All elements in the window are cleared and the window is discarded, without evaluating the window function or emitting any elements.
  • Method Details

    • values

      public static TriggerResult[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static TriggerResult valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • isFire

      public boolean isFire()
    • isPurge

      public boolean isPurge()