@Override public boolean hasNext() { while (!stopped && windowEvent == null && inner.hasNext()) { Event<T> cur = inner.next(); EvictionPolicy.Action action = evictionPolicy.evict(cur); if (action == EXPIRE) { inner.remove(); } else if (action == STOP) { stopped = true; } else if (action == PROCESS) { windowEvent = cur.get(); } } return windowEvent != null; }
return event.get(selectedPosition);
Action action = evictionPolicy.evict(windowEvent); if (action == EXPIRE) { eventsToExpire.add(windowEvent.get()); it.remove(); } else if (!fullScan || action == STOP) {
@Override public Action evict(Event<Integer> event) { eventsScanned.add(event.get()); return super.evict(event); }
Action action = evictionPolicy.evict(windowEvent); if (action == EXPIRE) { eventsToExpire.add(windowEvent.get()); it.remove(); } else if (!fullScan || action == STOP) {