W - The kind of windows being processed.public class TriggerRunner<W extends BoundedWindow> extends Object
ReduceFnRunner.
This is responsible for:
| Modifier and Type | Class and Description |
|---|---|
static class |
TriggerRunner.Result
Result of trigger execution.
|
| Constructor and Description |
|---|
TriggerRunner(ExecutableTrigger<W> rootTrigger,
com.google.cloud.dataflow.sdk.util.TriggerContextFactory<W> contextFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearEverything(ReduceFn.Context c)
Clear all the state for executing triggers, including the finished bits.
|
void |
clearState(ReduceFn.Context c)
Clear the state used for executing triggers, but leave the finished set to indicate
the window is closed.
|
boolean |
isClosed(ReduceFn.StateContext state)
Return true if the trigger is closed in the window corresponding to the specified state.
|
TriggerRunner.Result |
onMerge(ReduceFn.OnMergeContext c)
Run the trigger merging logic as part of executing the specified merge.
|
TriggerRunner.Result |
onTimer(ReduceFn.Context c,
TimerInternals.TimerData timer)
Run the trigger logic appropriate for receiving a timer with the specified destination ID.
|
void |
prefetchForMerge(ReduceFn.MergingStateContext state) |
void |
prefetchForTimer(ReduceFn.StateContext state) |
void |
prefetchForValue(ReduceFn.StateContext state) |
TriggerRunner.Result |
processValue(ReduceFn.ProcessValueContext c)
Run the trigger logic to deal with a new value.
|
public TriggerRunner(ExecutableTrigger<W> rootTrigger, com.google.cloud.dataflow.sdk.util.TriggerContextFactory<W> contextFactory)
public boolean isClosed(ReduceFn.StateContext state)
public TriggerRunner.Result processValue(ReduceFn.ProcessValueContext c) throws Exception
Exceptionpublic TriggerRunner.Result onMerge(ReduceFn.OnMergeContext c) throws Exception
Exceptionpublic TriggerRunner.Result onTimer(ReduceFn.Context c, TimerInternals.TimerData timer) throws Exception
Exceptionpublic void clearState(ReduceFn.Context c) throws Exception
Exceptionpublic void clearEverything(ReduceFn.Context c) throws Exception
Exceptionpublic void prefetchForValue(ReduceFn.StateContext state)
public void prefetchForMerge(ReduceFn.MergingStateContext state)
public void prefetchForTimer(ReduceFn.StateContext state)