/** * This method processed an arrived real element The method is synchronized to ensure that it * cannot interleave with {@link StreamDiscretizer#triggerOnFakeElement(Object)} * * @param input a real input element * @throws Exception */ protected synchronized void processRealElement(IN input) throws Exception { // Setting the input element in order to avoid NullFieldException when triggering on fake // element windowEvent.setElement(input); if (isActiveTrigger) { ActiveTriggerPolicy<IN> trigger = (ActiveTriggerPolicy<IN>) triggerPolicy; Object[] result = trigger.preNotifyTrigger(input); for (Object in : result) { triggerOnFakeElement(in); } } boolean isTriggered = false; if (triggerPolicy.notifyTrigger(input)) { emitWindow(); isTriggered = true; } evict(input, isTriggered); output.collect(windowEvent.setElement(input)); bufferSize++; }