public static class AfterWatermark.FromEndOfWindow<W extends BoundedWindow> extends Trigger.OnceTrigger<W>
Trigger.MergeResult, Trigger.MergingTriggerInfo<W extends BoundedWindow>, Trigger.OnceTrigger<W extends BoundedWindow>, Trigger.OnElementContext, Trigger.OnMergeContext, Trigger.OnTimerContext, Trigger.TriggerContext, Trigger.TriggerInfo<W extends BoundedWindow>, Trigger.TriggerResultsubTriggers| Modifier and Type | Method and Description |
|---|---|
void |
clear(Trigger.TriggerContext c)
Clear any state associated with this trigger in the given window.
|
boolean |
equals(Object obj) |
AfterWatermark.FromEndOfWindow<W> |
getContinuationTrigger(List<Trigger<W>> continuationTriggers)
Return the
Trigger.getContinuationTrigger() of this Trigger. |
Instant |
getWatermarkThatGuaranteesFiring(W window)
Returns a bound in watermark time by which this trigger would have fired at least once
for a given window had there been input data.
|
int |
hashCode() |
Trigger.TriggerResult |
onElement(Trigger.OnElementContext c)
Called immediately after an element is first incorporated into a window.
|
Trigger.MergeResult |
onMerge(Trigger.OnMergeContext c)
Called immediately after windows have been merged.
|
Trigger.TriggerResult |
onTimer(Trigger.OnTimerContext c)
Called when a timer has fired for the current window.
|
String |
toString() |
AfterWatermark.AfterWatermarkEarly<W> |
withEarlyFirings(Trigger.OnceTrigger<W> earlyFirings)
Creates a new
Trigger like the this, except that it fires repeatedly whenever
the given Trigger fires before the watermark has passed the end of the window. |
AfterWatermark.AfterWatermarkLate<W> |
withLateFirings(Trigger.OnceTrigger<W> lateFirings)
Creates a new
Trigger like the this, except that it fires repeatedly whenever
the given Trigger fires after the watermark has passed the end of the window. |
getContinuationTriggerbuildTrigger, isCompatible, orFinally, prefetchOnElement, prefetchOnMerge, prefetchOnTimer, subTriggerspublic AfterWatermark.AfterWatermarkEarly<W> withEarlyFirings(Trigger.OnceTrigger<W> earlyFirings)
Trigger like the this, except that it fires repeatedly whenever
the given Trigger fires before the watermark has passed the end of the window.public AfterWatermark.AfterWatermarkLate<W> withLateFirings(Trigger.OnceTrigger<W> lateFirings)
Trigger like the this, except that it fires repeatedly whenever
the given Trigger fires after the watermark has passed the end of the window.public Trigger.TriggerResult onElement(Trigger.OnElementContext c) throws Exception
TriggeronElement in class Trigger<W extends BoundedWindow>Exceptionpublic Trigger.MergeResult onMerge(Trigger.OnMergeContext c) throws Exception
TriggerLeaf triggers should determine their result by inspecting their status and any state
in the merging windows. Composite triggers should determine their result by calling
ExecutableTrigger.invokeMerge(com.google.cloud.dataflow.sdk.transforms.windowing.Trigger<W>.OnMergeContext) on their sub-triggers, and applying appropriate logic.
A trigger can only return Trigger.MergeResult.ALREADY_FINISHED if it is marked as finished
in at least one of the windows being merged.
The implementation does not need to clear out any state associated with the old windows.
onMerge in class Trigger<W extends BoundedWindow>Exceptionpublic Trigger.TriggerResult onTimer(Trigger.OnTimerContext c) throws Exception
TriggeronTimer in class Trigger<W extends BoundedWindow>Exceptionpublic void clear(Trigger.TriggerContext c) throws Exception
TriggerThis is called after a trigger has indicated it will never fire again. The trigger system keeps enough information to know that the trigger is finished, so this trigger should clear all of its state.
clear in class Trigger<W extends BoundedWindow>Exceptionpublic Instant getWatermarkThatGuaranteesFiring(W window)
TriggerFor triggers that do not fire based on the watermark advancing, returns
BoundedWindow.TIMESTAMP_MAX_VALUE.
This estimate is used to determine that there are no elements in a side-input window, which causes the default value to be used instead.
getWatermarkThatGuaranteesFiring in class Trigger<W extends BoundedWindow>public AfterWatermark.FromEndOfWindow<W> getContinuationTrigger(List<Trigger<W>> continuationTriggers)
TriggerTrigger.getContinuationTrigger() of this Trigger. For convenience, this
is provided the continuation trigger of each of the sub-triggers.getContinuationTrigger in class Trigger<W extends BoundedWindow>public String toString()
toString in class Trigger<W extends BoundedWindow>public boolean equals(Object obj)
equals in class Trigger<W extends BoundedWindow>public int hashCode()
hashCode in class Trigger<W extends BoundedWindow>