Google Cloud Dataflow SDK for Java, version 1.9.1
com.google.cloud.dataflow.sdk.transforms.windowing
Class AfterProcessingTime<W extends BoundedWindow>
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.transforms.windowing.Trigger<W>
-
- com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.OnceTrigger<W>
-
- com.google.cloud.dataflow.sdk.transforms.windowing.AfterDelayFromFirstElement<W>
-
- com.google.cloud.dataflow.sdk.transforms.windowing.AfterProcessingTime<W>
-
- Type Parameters:
W
-BoundedWindow
subclass used to represent the windows used
- All Implemented Interfaces:
- TriggerBuilder<W>, Serializable
@Experimental(value=TRIGGER) public class AfterProcessingTime<W extends BoundedWindow> extends AfterDelayFromFirstElement<W>
AfterProcessingTime
triggers fire based on the current processing time. They operate in the real-time domain.The time at which to fire the timer can be adjusted via the methods in
TimeTrigger
, such asTimeTrigger#plusDelayOf
orTimeTrigger#alignedTo
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.Trigger
Trigger.MergingTriggerInfo<W extends BoundedWindow>, Trigger.OnceTrigger<W extends BoundedWindow>, Trigger.OnElementContext, Trigger.OnMergeContext, Trigger.TriggerContext, Trigger.TriggerInfo<W extends BoundedWindow>
-
-
Field Summary
-
Fields inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.AfterDelayFromFirstElement
DELAYED_UNTIL_TAG, IDENTITY, timestampMappers
-
Fields inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.Trigger
subTriggers
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
equals(Object obj)
protected Trigger<W>
getContinuationTrigger(List<Trigger<W>> continuationTriggers)
Return theTrigger.getContinuationTrigger()
of thisTrigger
.Instant
getCurrentTime(Trigger.TriggerContext context)
To complete an implementation, return the desired time from the TriggerContext.Instant
getWatermarkThatGuaranteesFiring(W window)
Returns a bound in watermark time by which this trigger would have fired at least once for a given window had there been input data.int
hashCode()
protected AfterProcessingTime<W>
newWith(List<SerializableFunction<Instant,Instant>> transforms)
To complete an implementation, return a new instance like this one, but incorporating the provided timestamp mapping functions.static <W extends BoundedWindow>
AfterProcessingTime<W>pastFirstElementInPane()
Creates a trigger that fires when the current processing time passes the processing time at which this trigger saw the first element in a pane.String
toString()
-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.AfterDelayFromFirstElement
alignedTo, alignedTo, clear, computeTargetTimestamp, isCompatible, mappedTo, onElement, onMerge, onOnlyFiring, plusDelayOf, prefetchOnElement, prefetchOnMerge, prefetchShouldFire, shouldFire
-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.OnceTrigger
getContinuationTrigger, onFire
-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.Trigger
buildTrigger, orFinally, prefetchOnFire, subTriggers
-
-
-
-
Method Detail
-
getCurrentTime
@Nullable public Instant getCurrentTime(Trigger.TriggerContext context)
Description copied from class:AfterDelayFromFirstElement
To complete an implementation, return the desired time from the TriggerContext.- Specified by:
getCurrentTime
in classAfterDelayFromFirstElement<W extends BoundedWindow>
-
pastFirstElementInPane
public static <W extends BoundedWindow> AfterProcessingTime<W> pastFirstElementInPane()
Creates a trigger that fires when the current processing time passes the processing time at which this trigger saw the first element in a pane.
-
newWith
protected AfterProcessingTime<W> newWith(List<SerializableFunction<Instant,Instant>> transforms)
Description copied from class:AfterDelayFromFirstElement
To complete an implementation, return a new instance like this one, but incorporating the provided timestamp mapping functions. Generally should be used by calling the constructor of this class from the constructor of the subclass.- Specified by:
newWith
in classAfterDelayFromFirstElement<W extends BoundedWindow>
-
getWatermarkThatGuaranteesFiring
public Instant getWatermarkThatGuaranteesFiring(W window)
Description copied from class:Trigger
Returns a bound in watermark time by which this trigger would have fired at least once for a given window had there been input data. This is a static property of a trigger that does not depend on its state.For triggers that do not fire based on the watermark advancing, returns
BoundedWindow.TIMESTAMP_MAX_VALUE
.This estimate is used to determine that there are no elements in a side-input window, which causes the default value to be used instead.
- Overrides:
getWatermarkThatGuaranteesFiring
in classAfterDelayFromFirstElement<W extends BoundedWindow>
-
getContinuationTrigger
protected Trigger<W> getContinuationTrigger(List<Trigger<W>> continuationTriggers)
Description copied from class:Trigger
Return theTrigger.getContinuationTrigger()
of thisTrigger
. For convenience, this is provided the continuation trigger of each of the sub-triggers.- Specified by:
getContinuationTrigger
in classTrigger<W extends BoundedWindow>
-
toString
public String toString()
- Overrides:
toString
in classTrigger<W extends BoundedWindow>
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classTrigger<W extends BoundedWindow>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classTrigger<W extends BoundedWindow>
-
-