Class ContinuousProcessingTimeTrigger<W extends org.apache.flink.streaming.api.windowing.windows.Window>
- java.lang.Object
-
- org.apache.flink.streaming.api.windowing.triggers.Trigger<Object,W>
-
- org.apache.flink.streaming.api.windowing.triggers.ContinuousProcessingTimeTrigger<W>
-
- Type Parameters:
W
- The type ofWindows
on which this trigger can operate.
- All Implemented Interfaces:
Serializable
@PublicEvolving public class ContinuousProcessingTimeTrigger<W extends org.apache.flink.streaming.api.windowing.windows.Window> extends org.apache.flink.streaming.api.windowing.triggers.Trigger<Object,W>
ATrigger
that continuously fires based on a given time interval as measured by the clock of the machine on which the job is running.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canMerge()
void
clear(W window, org.apache.flink.streaming.api.windowing.triggers.Trigger.TriggerContext ctx)
long
getInterval()
static <W extends org.apache.flink.streaming.api.windowing.windows.Window>
ContinuousProcessingTimeTrigger<W>of(Duration interval)
Creates a trigger that continuously fires based on the given interval.org.apache.flink.streaming.api.windowing.triggers.TriggerResult
onElement(Object element, long timestamp, W window, org.apache.flink.streaming.api.windowing.triggers.Trigger.TriggerContext ctx)
org.apache.flink.streaming.api.windowing.triggers.TriggerResult
onEventTime(long time, W window, org.apache.flink.streaming.api.windowing.triggers.Trigger.TriggerContext ctx)
void
onMerge(W window, org.apache.flink.streaming.api.windowing.triggers.Trigger.OnMergeContext ctx)
org.apache.flink.streaming.api.windowing.triggers.TriggerResult
onProcessingTime(long time, W window, org.apache.flink.streaming.api.windowing.triggers.Trigger.TriggerContext ctx)
String
toString()
-
-
-
Method Detail
-
onElement
public org.apache.flink.streaming.api.windowing.triggers.TriggerResult onElement(Object element, long timestamp, W window, org.apache.flink.streaming.api.windowing.triggers.Trigger.TriggerContext ctx) throws Exception
-
onEventTime
public org.apache.flink.streaming.api.windowing.triggers.TriggerResult onEventTime(long time, W window, org.apache.flink.streaming.api.windowing.triggers.Trigger.TriggerContext ctx) throws Exception
-
onProcessingTime
public org.apache.flink.streaming.api.windowing.triggers.TriggerResult onProcessingTime(long time, W window, org.apache.flink.streaming.api.windowing.triggers.Trigger.TriggerContext ctx) throws Exception
-
clear
public void clear(W window, org.apache.flink.streaming.api.windowing.triggers.Trigger.TriggerContext ctx) throws Exception
-
canMerge
public boolean canMerge()
-
onMerge
public void onMerge(W window, org.apache.flink.streaming.api.windowing.triggers.Trigger.OnMergeContext ctx) throws Exception
-
getInterval
@VisibleForTesting public long getInterval()
-
of
public static <W extends org.apache.flink.streaming.api.windowing.windows.Window> ContinuousProcessingTimeTrigger<W> of(Duration interval)
Creates a trigger that continuously fires based on the given interval.- Type Parameters:
W
- The type ofWindows
on which this trigger can operate.- Parameters:
interval
- The time interval at which to fire.
-
-