Interface BundleTrigger<T>
-
- Type Parameters:
T
- The input element type.
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CountBundleTrigger
@Internal public interface BundleTrigger<T> extends Serializable
ABundleTrigger
determines when a bundle of input elements should be evaluated and trigger the callback which registered previously.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
explain()
void
onElement(T element)
Called for every element that gets added to the bundle.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
void registerCallback(BundleTriggerCallback callback)
Register a callback which will be called once this trigger decides to finish this bundle.
-
onElement
void onElement(T element) throws Exception
Called for every element that gets added to the bundle. If the trigger decides to start evaluate the input,BundleTriggerCallback.finishBundle()
should be invoked.- Parameters:
element
- The element that arrived.- Throws:
Exception
-
reset
void reset()
Reset the trigger to its initiate status.
-
explain
String explain()
-
-