/** * Get the events currently buffered. Returns null if the buffer is empty. Flushes the buffer. * * @return array of events in buffer or null if empty */ public EventBean[] getAndFlush() { EventBean[] flattened = EventBeanUtility.flatten(remainEvents); remainEvents.clear(); return flattened; }
EventBean[] distinct = EventBeanUtility.getDistinctByProp(EventBeanUtility.flatten(events), select.getEventBeanReaderDistinct()); return new EPPreparedQueryResult(select.getEventType(), distinct);