}
}
private static void doDeleteSegmentMemory(LeftTuple leftTuple, PropagationContext pctx, final LiaNodeMemory lm,
SegmentMemory sm, InternalWorkingMemory wm, boolean linkOrNotify) {
LeftTupleSets leftTuples = sm.getStagedLeftTuples();
leftTuple.setPropagationContext( pctx );
boolean stagedDeleteWasEmpty = false;
if ( ((BaseNode)sm.getRootNode()).isStreamMode() && sm.getTupleQueue() != null ) {
stagedDeleteWasEmpty = sm.getTupleQueue().isEmpty();
int propagationType = pctx.getType() == PropagationContext.MODIFICATION ? PropagationContext.DELETION : pctx.getType();
sm.getTupleQueue().add(new LeftTupleEntry(leftTuple, pctx, sm.getNodeMemories().getFirst(), propagationType));
if ( log.isTraceEnabled() ) {
log.trace( "LeftInputAdapterNode delete size={} queue={} pctx={} lt={}", System.identityHashCode( sm.getTupleQueue() ), sm.getTupleQueue().size(), PhreakPropagationContext.intEnumToString(pctx), leftTuple );
}
} else {
stagedDeleteWasEmpty = leftTuples.addDelete(leftTuple);
}
if ( stagedDeleteWasEmpty && linkOrNotify ) {
// staged is empty, so notify rule, to force re-evaluation
lm.setNodeDirty(wm);