public static interface Trigger.TriggerContext
Trigger methods to allow them to register timer
callbacks and deal with state.| Modifier and Type | Method and Description |
|---|---|
<S extends Serializable> |
getKeyValueState(String name,
S defaultState)
Retrieves an
OperatorState object that can be used to interact with
fault-tolerant state that is scoped to the window and key of the current
trigger invocation. |
void |
registerEventTimeTimer(long time)
Register an event-time callback.
|
void |
registerProcessingTimeTimer(long time)
Register a system time callback.
|
void registerProcessingTimeTimer(long time)
Trigger.onProcessingTime(long, Window, TriggerContext) is called with the time specified here.time - The time at which to invoke Trigger.onProcessingTime(long, Window, TriggerContext)void registerEventTimeTimer(long time)
Trigger.onEventTime(long, Window, TriggerContext) is called with the time specified here.time - The watermark at which to invoke Trigger.onEventTime(long, Window, TriggerContext)Watermark<S extends Serializable> OperatorState<S> getKeyValueState(String name, S defaultState)
OperatorState object that can be used to interact with
fault-tolerant state that is scoped to the window and key of the current
trigger invocation.name - A unique key for the state.defaultState - The default value of the state.Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.