public abstract class Trigger.OnElementContext extends Trigger.TriggerContext
Trigger.TriggerContext containing information accessible to the Trigger.onElement(org.apache.beam.sdk.transforms.windowing.Trigger.OnElementContext)
operational hook.| Constructor and Description |
|---|
OnElementContext() |
| Modifier and Type | Method and Description |
|---|---|
abstract Instant |
eventTimestamp()
The event timestamp of the element currently being processed.
|
abstract Trigger.OnElementContext |
forTrigger(org.apache.beam.sdk.util.ExecutableTrigger trigger)
Create an
OnElementContext for executing the given trigger. |
abstract void |
setTimer(Instant timestamp,
org.apache.beam.sdk.util.TimeDomain domain)
Sets a timer to fire when the watermark or processing time is beyond the given timestamp.
|
currentEventTime, currentProcessingTime, currentSynchronizedProcessingTime, deleteTimer, state, trigger, windowpublic abstract Instant eventTimestamp()
public abstract void setTimer(Instant timestamp, org.apache.beam.sdk.util.TimeDomain domain)
As with Trigger.TriggerContext.state(), timers are implicitly scoped to the current window. All
timer firings for a window will be received, but the implementation should choose to ignore
those that are not applicable.
timestamp - the time at which the trigger should be re-evaluateddomain - the domain that the timestamp applies topublic abstract Trigger.OnElementContext forTrigger(org.apache.beam.sdk.util.ExecutableTrigger trigger)
OnElementContext for executing the given trigger.forTrigger in class Trigger.TriggerContext