DATA - The data type which can be handled by this policypublic interface ActiveTriggerPolicy<DATA> extends TriggerPolicy<DATA>
TriggerPolicy interface with functionality
for active triggers. Active triggers can act in two ways:
1) Whenever an element arrives at the operator, the
preNotifyTrigger(Object) method gets called
first. It can return zero ore more fake data points which will be added
before the currently arrived real element gets processed. This allows to
handle empty windows in time based windowing with an user defined
Timestamp. Triggers are not called on fake datapoint. A fake
datapoint is always considered as triggered.
2) An active trigger has a factory method for a runnable. This factory method
gets called at the start up of the operator. The returned runnable will be
executed in its own thread and can submit fake elements at any time through an
ActiveTriggerCallback. This allows to have time based triggers based
on any system internal time measure. Triggers are not called on fake
datapoint. A fake datapoints is always considered as triggered.| Modifier and Type | Method and Description |
|---|---|
Runnable |
createActiveTriggerRunnable(ActiveTriggerCallback callback)
This is the factory method for a runnable.
|
Object[] |
preNotifyTrigger(DATA datapoint)
Whenever an element arrives at the operator, the
preNotifyTrigger(Object) method gets called
first. |
notifyTriggerObject[] preNotifyTrigger(DATA datapoint)
preNotifyTrigger(Object) method gets called
first. It can return zero ore more fake data points which will be added
before the the currently arrived real element gets processed. This allows
to handle empty windows in time based windowing with an user defined
Timestamp. Triggers are not called on fake datapoints. A fake
datapoint is always considered as triggered.datapoint - the data point which arrived at the operatorRunnable createActiveTriggerRunnable(ActiveTriggerCallback callback)
ActiveTriggerCallback. This allows to have time based triggers
based on any system internal time measure. Triggers are not called on
fake datapoints. A fake datapoint is always considered as triggered.callback - A callback object which allows to add fake elements from
within the returned Runnable.ActiveTriggerPolicy is used, it can implement own
Runnable classes. Such Runnable classes will be
executed as an own thread and can submit fake elements, to the
element buffer at any time.Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.