for ( RightTuple rightTuple = srcRightTuples.getUpdateFirst(); rightTuple != null; ) {
RightTuple next = rightTuple.getStagedNext();
PropagationContext context = rightTuple.getPropagationContext();
LeftTuple childLeftTuple = rightTuple.getFirstChild();
LeftTuple leftTuple = joinNode.getFirstLeftTuple( rightTuple, ltm, context, it );
constraints.updateFromFactHandle( contextEntry,
wm,
rightTuple.getFactHandle() );
// first check our index (for indexed nodes only) hasn't changed and we are returning the same bucket
// We assume a bucket change if leftTuple == null
if ( childLeftTuple != null && ltm.isIndexed() && !it.isFullIterator() && (leftTuple == null || (leftTuple.getMemory() != childLeftTuple.getLeftParent().getMemory())) ) {
// our index has changed, so delete all the previous propagations
while ( childLeftTuple != null ) {
childLeftTuple = deleteRightChild( childLeftTuple, trgLeftTuples, stagedLeftTuples );
}
// childLeftTuple is now null, so the next check will attempt matches for new bucket