final Object context,
final InternalWorkingMemory workingMemory) {
TimerService clock = workingMemory.getTimerService();
long currentTime = clock.getCurrentTime();
SlidingTimeWindowContext queue = (SlidingTimeWindowContext) context;
EventFactHandle handle = queue.queue.peek();
synchronized (queue.queue) {
while ( handle != null && isExpired( currentTime,
handle ) ) {
queue.expiringHandle = handle;
queue.queue.remove();
if( handle.isValid()) {
// if not expired yet, expire it
final PropagationContext propagationContext = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
PropagationContext.EXPIRATION,
null,
null,