Enum TriggerResult
- All Implemented Interfaces:
Serializable,Comparable<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 Summary
Enum ConstantsEnum ConstantDescriptionNo action is taken on the window.OnFIRE, the window is evaluated and results are emitted.FIRE_AND_PURGEevaluates the window function and emits the window result.All elements in the window are cleared and the window is discarded, without evaluating the window function or emitting any elements. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisFire()booleanisPurge()static TriggerResultReturns 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 Details
-
CONTINUE
No action is taken on the window. -
FIRE_AND_PURGE
FIRE_AND_PURGEevaluates the window function and emits the window result. -
FIRE
OnFIRE, the window is evaluated and results are emitted. The window is not purged, though, all elements are retained. -
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
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
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()
-