public abstract class Trigger.OnElementContext extends Trigger.TriggerContext
Trigger.onElement(com.google.cloud.dataflow.sdk.transforms.windowing.Trigger<W>.OnElementContext).| 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(com.google.cloud.dataflow.sdk.util.ExecutableTrigger<W> trigger)
Create an
OnElementContext for executing the given trigger. |
abstract void |
setTimer(Instant timestamp,
com.google.cloud.dataflow.sdk.util.TimeDomain domain)
Sets a timer to fire when the watermark or processing time is beyond the given timestamp.
|
currentProcessingTime, deleteTimer, state, trigger, windowpublic abstract Instant eventTimestamp()
public abstract void setTimer(Instant timestamp, com.google.cloud.dataflow.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’s Trigger.onTimer(com.google.cloud.dataflow.sdk.transforms.windowing.Trigger<W>.OnTimerContext) callback should
executedomain - the domain that the timestamp applies topublic abstract Trigger.OnElementContext forTrigger(com.google.cloud.dataflow.sdk.util.ExecutableTrigger<W> trigger)
OnElementContext for executing the given trigger.forTrigger in class Trigger.TriggerContext