@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. |
boolean |
mayFinish()
For internal use only; no backwards-compatibility guarantees.
|
equals, getContinuationTrigger, getWatermarkThatGuaranteesFiring, hashCode, isCompatible, orFinally, subTriggers, toString
public final boolean mayFinish()
Trigger
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()
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