public enum TriggerResult extends Enum<TriggerResult>
| Enum Constant and Description |
|---|
CONTINUE
No action is taken on the window.
|
FIRE
On
FIRE, 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.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isFire() |
boolean |
isPurge() |
static TriggerResult |
merge(TriggerResult a,
TriggerResult b)
Merges two
TriggerResults. |
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.
|
public static final TriggerResult CONTINUE
public static final TriggerResult FIRE_AND_PURGE
FIRE_AND_PURGE evaluates the window function and emits the window
result.public static final TriggerResult FIRE
FIRE, the window is evaluated and results are emitted.
The window is not purged, though, all elements are retained.public static final TriggerResult PURGE
public static TriggerResult[] values()
for (TriggerResult c : TriggerResult.values()) System.out.println(c);
public static TriggerResult valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean isFire()
public boolean isPurge()
public static TriggerResult merge(TriggerResult a, TriggerResult b)
TriggerResults. This specifies what should happen if we have
two results from a Trigger, for example as a result from
Trigger.onElement(Object, long, Window, Trigger.TriggerContext) and
Trigger.onEventTime(long, Window, Trigger.TriggerContext).
For example, if one result says CONTINUE while the other says FIRE
then FIRE is the combined result;
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.