W - BoundedWindow subclass used to represent the windows used by this
TriggerContextpublic static interface Trigger.TriggerContext<W extends BoundedWindow>
| Modifier and Type | Method and Description |
|---|---|
Instant |
currentProcessingTime()
Returns the current processing time.
|
void |
deleteTimer(W window,
Trigger.TimeDomain timeDomain)
Removes the timer set in this trigger context for the given
window and
timeDomain. |
Trigger.TriggerContext<W> |
forChild(int childIndex)
Create a
TriggerContext for executing a given sub-trigger. |
<T> java.util.Map<W,T> |
lookup(CodedTupleTag<T> tag,
java.lang.Iterable<W> windows)
Lookup the value stored for a given
tag in a bunch of windows. |
<T> T |
lookup(CodedTupleTag<T> tag,
W window)
Lookup the value stored for the given
tag and window. |
<T> void |
remove(CodedTupleTag<T> tag,
W window)
Removes the keyed state associated with the given
tag and window. |
void |
setTimer(W window,
Instant timestamp,
Trigger.TimeDomain timeDomain)
Sets a timer to fire when the watermark or processing time is beyond the given timestamp.
|
<T> void |
store(CodedTupleTag<T> tag,
W window,
T value)
Updates the value stored in keyed state for the given
tag and window. |
void setTimer(W window, Instant timestamp, Trigger.TimeDomain timeDomain) throws java.io.IOException
Each trigger can have a single timer in per timeDomain and window. If the
trigger has already set a timer for a given domain and window, then setting overwrites it.
window - the window the timer is being set for.timestamp - the time at which the trigger’s Trigger.onTimer(com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.TriggerContext<W>, com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.OnTimerEvent<W>) callback should
executetimeDomain - the domain that the timestamp applies tojava.io.IOExceptionvoid deleteTimer(W window, Trigger.TimeDomain timeDomain) throws java.io.IOException
window and
timeDomain.java.io.IOExceptionInstant currentProcessingTime()
<T> void store(CodedTupleTag<T> tag, W window, T value) throws java.io.IOException
tag and window.java.io.IOException<T> void remove(CodedTupleTag<T> tag, W window) throws java.io.IOException
tag and window.java.io.IOException<T> T lookup(CodedTupleTag<T> tag, W window) throws java.io.IOException
tag and window.java.io.IOException<T> java.util.Map<W,T> lookup(CodedTupleTag<T> tag, java.lang.Iterable<W> windows) throws java.io.IOException
tag in a bunch of windows.java.io.IOExceptionTrigger.TriggerContext<W> forChild(int childIndex)
TriggerContext for executing a given sub-trigger.