Enum TriggerResult
- 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
returnsFIRE
orFIRE_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 Summary
Enum Constants Enum Constant Description CONTINUE
No action is taken on the window.FIRE
OnFIRE
, the window is evaluated and results are emitted.FIRE_AND_PURGE
FIRE_AND_PURGE
evaluates the window function and emits the window result.PURGE
All elements in the window are cleared and the window is discarded, without evaluating the window function or emitting any elements.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isFire()
boolean
isPurge()
static TriggerResult
valueOf(String name)
Returns the enum constant of this type with the specified name.static TriggerResult[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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
OnFIRE
, 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 Detail
-
values
public static TriggerResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TriggerResult c : TriggerResult.values()) System.out.println(c);
- 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 nameNullPointerException
- if the argument is null
-
isFire
public boolean isFire()
-
isPurge
public boolean isPurge()
-
-