}
public synchronized void reEvaluateNetwork(InternalWorkingMemory wm, LinkedList<StackEntry> outerStack, boolean fireUntilHalt) {
if (isDirty() || (pmem.getStreamQueue() != null && !pmem.getStreamQueue().isEmpty())) {
setDirty(false);
TupleEntryQueue queue = pmem.getStreamQueue() != null ? pmem.getStreamQueue().takeAllForFlushing() : null;
if ( queue == null || queue.isEmpty() ) {
NETWORK_EVALUATOR.evaluateNetwork(pmem, outerStack, this, wm);
} else {
while (!queue.isEmpty()) {
removeQueuedTupleEntry( queue );
NETWORK_EVALUATOR.evaluateNetwork(pmem, outerStack, this, wm);
}
}
}