DATA - the data type handled by this policypublic class MultiTriggerPolicy<DATA> extends Object implements ActiveTriggerPolicy<DATA>
| Constructor and Description |
|---|
MultiTriggerPolicy(TriggerPolicy<DATA>... policies)
This policy allows to use multiple trigger policies at the same time.
|
| Modifier and Type | Method and Description |
|---|---|
Runnable |
createActiveTriggerRunnable(ActiveTriggerCallback callback)
This is the factory method for a runnable.
|
boolean |
notifyTrigger(DATA datapoint)
Proves and returns if a new window should be started.
|
Object[] |
preNotifyTrigger(DATA datapoint)
Whenever an element arrives at the operator, the
ActiveTriggerPolicy.preNotifyTrigger(Object) method gets called
first. |
public MultiTriggerPolicy(TriggerPolicy<DATA>... policies)
policies - Any active or not active trigger policies. Both types can be
used at the same time.public boolean notifyTrigger(DATA datapoint)
TriggerPolicynotifyTrigger in interface TriggerPolicy<DATA>datapoint - the data point which arrivedpublic Object[] preNotifyTrigger(DATA datapoint)
ActiveTriggerPolicyActiveTriggerPolicy.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.preNotifyTrigger in interface ActiveTriggerPolicy<DATA>datapoint - the data point which arrived at the operatorpublic Runnable createActiveTriggerRunnable(ActiveTriggerCallback callback)
ActiveTriggerPolicyActiveTriggerCallback. 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.createActiveTriggerRunnable in interface ActiveTriggerPolicy<DATA>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.