@Internal public abstract static class Trigger.OnceTrigger extends Trigger
Triggers that are guaranteed to fire at most once should extend Trigger.OnceTrigger
rather than the general Trigger
class to indicate that behavior.
Trigger.OnceTrigger
subTriggers
Modifier | Constructor and Description |
---|---|
protected |
OnceTrigger(java.util.List<Trigger> subTriggers) |
Modifier and Type | Method and Description |
---|---|
Trigger.OnceTrigger |
getContinuationTrigger()
Return a trigger to use after a
GroupByKey to preserve the intention of this trigger. |
equals, getContinuationTrigger, getWatermarkThatGuaranteesFiring, hashCode, isCompatible, orFinally, subTriggers, toString
protected OnceTrigger(@Nullable java.util.List<Trigger> subTriggers)
public final Trigger.OnceTrigger getContinuationTrigger()
Trigger
GroupByKey
to preserve the intention of this trigger.
Specifically, triggers that are time based and intended to provide speculative results should
continue providing speculative results. Triggers that fire once (or multiple times) should
continue firing once (or multiple times).
If this method is not overridden, its default implementation delegates its behavior to
Trigger.getContinuationTrigger(List)
which is expected to be implemented by subclasses.
getContinuationTrigger
in class Trigger