Class CountCoBundleTrigger<IN1,IN2>
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.bundle.trigger.CountCoBundleTrigger<IN1,IN2>
-
- All Implemented Interfaces:
Serializable
,CoBundleTrigger<IN1,IN2>
public class CountCoBundleTrigger<IN1,IN2> extends Object implements CoBundleTrigger<IN1,IN2>
ACoBundleTrigger
that fires once the count of elements in a bundle reaches the given count.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CountCoBundleTrigger(long maxCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
explain()
void
onElement1(IN1 element)
Called for every element that gets added to the bundle from the first input.void
onElement2(IN2 element)
Called for every element that gets added to the bundle from the second input.void
registerCallback(BundleTriggerCallback callback)
Register a callback which will be called once this trigger decides to finish this bundle.void
reset()
Reset the trigger to its initiate status.
-
-
-
Method Detail
-
registerCallback
public void registerCallback(BundleTriggerCallback callback)
Description copied from interface:CoBundleTrigger
Register a callback which will be called once this trigger decides to finish this bundle.- Specified by:
registerCallback
in interfaceCoBundleTrigger<IN1,IN2>
-
onElement1
public void onElement1(IN1 element) throws Exception
Description copied from interface:CoBundleTrigger
Called for every element that gets added to the bundle from the first input. If the trigger decides to start evaluate,BundleTriggerCallback.finishBundle()
should be invoked.- Specified by:
onElement1
in interfaceCoBundleTrigger<IN1,IN2>
- Parameters:
element
- The element that arrived from the first input.- Throws:
Exception
-
onElement2
public void onElement2(IN2 element) throws Exception
Description copied from interface:CoBundleTrigger
Called for every element that gets added to the bundle from the second input. If the trigger decides to start evaluate,BundleTriggerCallback.finishBundle()
should be invoked.- Specified by:
onElement2
in interfaceCoBundleTrigger<IN1,IN2>
- Parameters:
element
- The element that arrived from the second input.- Throws:
Exception
-
reset
public void reset()
Description copied from interface:CoBundleTrigger
Reset the trigger to its initiate status.- Specified by:
reset
in interfaceCoBundleTrigger<IN1,IN2>
-
explain
public String explain()
- Specified by:
explain
in interfaceCoBundleTrigger<IN1,IN2>
-
-