public abstract class Trigger.TriggerContext extends Object
Trigger.
Used directly in Trigger.shouldFire(org.apache.beam.sdk.transforms.windowing.Trigger.TriggerContext) and Trigger.clear(org.apache.beam.sdk.transforms.windowing.Trigger.TriggerContext), and
extended with additional information in other methods.
| Constructor and Description |
|---|
TriggerContext() |
| Modifier and Type | Method and Description |
|---|---|
abstract Instant |
currentEventTime()
The current event time for the input or
null if unknown. |
abstract Instant |
currentProcessingTime()
The current processing time.
|
abstract Instant |
currentSynchronizedProcessingTime()
The current synchronized upstream processing time or
null if unknown. |
abstract void |
deleteTimer(Instant timestamp,
org.apache.beam.sdk.util.TimeDomain domain)
Removes the timer set in this trigger context for the given
Instant
and TimeDomain. |
abstract Trigger.TriggerContext |
forTrigger(org.apache.beam.sdk.util.ExecutableTrigger trigger)
Create a sub-context for the given sub-trigger.
|
abstract org.apache.beam.sdk.util.state.StateAccessor<?> |
state()
Returns the interface for accessing persistent state.
|
abstract Trigger.TriggerInfo |
trigger()
Returns the interface for accessing trigger info.
|
abstract BoundedWindow |
window()
The window that the current context is executing in.
|
public abstract Trigger.TriggerInfo trigger()
public abstract org.apache.beam.sdk.util.state.StateAccessor<?> state()
public abstract BoundedWindow window()
public abstract Trigger.TriggerContext forTrigger(org.apache.beam.sdk.util.ExecutableTrigger trigger)
public abstract void deleteTimer(Instant timestamp, org.apache.beam.sdk.util.TimeDomain domain)
Instant
and TimeDomain.public abstract Instant currentProcessingTime()
@Nullable public abstract Instant currentSynchronizedProcessingTime()
null if unknown.