Class Trigger.OnceTrigger
- java.lang.Object
-
- org.apache.beam.sdk.transforms.windowing.Trigger
-
- org.apache.beam.sdk.transforms.windowing.Trigger.OnceTrigger
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AfterAll
,AfterFirst
,AfterPane
,AfterProcessingTime
,AfterSynchronizedProcessingTime
,AfterWatermark.FromEndOfWindow
,Never.NeverTrigger
- Enclosing class:
- Trigger
@Internal public abstract static class Trigger.OnceTrigger extends Trigger
For internal use only; no backwards-compatibility guarantees.Triggers that are guaranteed to fire at most once should extend
Trigger.OnceTrigger
rather than the generalTrigger
class to indicate that behavior.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.beam.sdk.transforms.windowing.Trigger
Trigger.OnceTrigger
-
-
Field Summary
-
Fields inherited from class org.apache.beam.sdk.transforms.windowing.Trigger
subTriggers
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
OnceTrigger(java.util.List<Trigger> subTriggers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Trigger.OnceTrigger
getContinuationTrigger()
Return a trigger to use after aGroupByKey
to preserve the intention of this trigger.boolean
mayFinish()
For internal use only; no backwards-compatibility guarantees.-
Methods inherited from class org.apache.beam.sdk.transforms.windowing.Trigger
equals, getContinuationTrigger, getWatermarkThatGuaranteesFiring, hashCode, isCompatible, orFinally, subTriggers, toString
-
-
-
-
Constructor Detail
-
OnceTrigger
protected OnceTrigger(java.util.List<Trigger> subTriggers)
-
-
Method Detail
-
mayFinish
public final boolean mayFinish()
Description copied from class:Trigger
For internal use only; no backwards-compatibility guarantees.Indicates whether this trigger may "finish". A top level trigger that finishes can cause data loss, so is rejected by GroupByKey validation.
-
getContinuationTrigger
public final Trigger.OnceTrigger getContinuationTrigger()
Description copied from class:Trigger
Return a trigger to use after aGroupByKey
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.- Overrides:
getContinuationTrigger
in classTrigger
-
-