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>
ACoBundleTriggerthat 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 Stringexplain()voidonElement1(IN1 element)Called for every element that gets added to the bundle from the first input.voidonElement2(IN2 element)Called for every element that gets added to the bundle from the second input.voidregisterCallback(BundleTriggerCallback callback)Register a callback which will be called once this trigger decides to finish this bundle.voidreset()Reset the trigger to its initiate status.
-
-
-
Method Detail
-
registerCallback
public void registerCallback(BundleTriggerCallback callback)
Description copied from interface:CoBundleTriggerRegister a callback which will be called once this trigger decides to finish this bundle.- Specified by:
registerCallbackin interfaceCoBundleTrigger<IN1,IN2>
-
onElement1
public void onElement1(IN1 element) throws Exception
Description copied from interface:CoBundleTriggerCalled 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:
onElement1in 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:CoBundleTriggerCalled 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:
onElement2in interfaceCoBundleTrigger<IN1,IN2>- Parameters:
element- The element that arrived from the second input.- Throws:
Exception
-
reset
public void reset()
Description copied from interface:CoBundleTriggerReset the trigger to its initiate status.- Specified by:
resetin interfaceCoBundleTrigger<IN1,IN2>
-
explain
public String explain()
- Specified by:
explainin interfaceCoBundleTrigger<IN1,IN2>
-
-