@Internal public abstract static class Trigger.OnceTrigger extends Trigger
Triggers that are guaranteed to fire at most once should extend
than the general
Trigger class to indicate that behavior.
|Modifier||Constructor and Description|
|Modifier and Type||Method and Description|
Return a trigger to use after a
For internal use only; no backwards-compatibility guarantees.
equals, getContinuationTrigger, getWatermarkThatGuaranteesFiring, hashCode, isCompatible, orFinally, subTriggers, toString
public final boolean mayFinish()
Indicates whether this trigger may "finish". A top level trigger that finishes can cause data loss, so is rejected by GroupByKey validation.
public final Trigger.OnceTrigger getContinuationTrigger()
GroupByKeyto 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.