Package org.drools.core.common

Examples of org.drools.core.common.RightTupleSets.addDelete()


        } else if ( stagedRightTuples.deleteSize() == 0 ) {
            // nothing staged before, notify rule, so it can evaluate network
            memory.getSegmentMemory().notifyRuleLinkSegment( wm );
        }
       
        stagedRightTuples.addDelete( rightTuple );
    }  
   
    public void doUpdateRightTuple(final RightTuple rightTuple,
                                    final InternalWorkingMemory wm,
                                    final BetaMemory memory) {
View Full Code Here


                case LeftTuple.UPDATE: {
                    rightTuples.removeUpdate(rightTuple);
                    break;
                }
            }
            rightTuples.addDelete(rightTuple);

            if (bns != null) {
                // Add peered RightTuples, they are attached to FH - unlink LeftTuples that has a peer ref
                for (int i = 0; i < length; i++) {
                    rightTuple = rightTuple.getHandleNext();
View Full Code Here

                        case LeftTuple.UPDATE: {
                            rightTuples.removeUpdate(rightTuple);
                            break;
                        }
                    }
                    rightTuples.addDelete(rightTuple);
                }
            }

            leftTuple.clearStaged();
            leftTuple = next;
View Full Code Here

            memory.getSegmentMemory().getTupleQueue().add(new RightTupleEntry(rightTuple, pctx, memory, propagationType));
            if ( log.isTraceEnabled() ) {
                log.trace( "{} delete queue={} size={} pctx={} lt={}", getClass().getSimpleName(), System.identityHashCode( memory.getSegmentMemory().getTupleQueue() ), memory.getSegmentMemory().getTupleQueue().size(), PhreakPropagationContext.intEnumToString(rightTuple.getPropagationContext()), rightTuple );
            }
        } else {
            stagedDeleteWasEmpty = stagedRightTuples.addDelete( rightTuple );
        }

        if ( memory.getAndDecCounter() == 1 ) {
            memory.unlinkNode( wm );
        } else if ( stagedDeleteWasEmpty ) {
View Full Code Here

            PropagationContext pctx = rightTuple.getPropagationContext();
            stagedDeleteWasEmpty = memory.getSegmentMemory().getTupleQueue().isEmpty();
            memory.getSegmentMemory().getTupleQueue().add(new RightTupleEntry(rightTuple, pctx, memory, pctx.getType()));
            //log.trace( "NotNode delete queue={} size={} lt={}", System.identityHashCode( memory.getSegmentMemory().getTupleQueue() ), memory.getSegmentMemory().getTupleQueue().size(), rightTuple );
        } else {
            stagedDeleteWasEmpty = stagedRightTuples.addDelete( rightTuple );
        }

        if memory.getAndDecCounter() == 1 && isEmptyBetaConstraints()  ) {
            // NotNodes can only be unlinked, if they have no variable constraints
            memory.linkNode( wm );
View Full Code Here

                        case PropagationContext.MODIFICATION:
                            rightTuples.addUpdate( rightTuple );
                            break;
                        case PropagationContext.DELETION:
                        case PropagationContext.RULE_REMOVAL:
                             rightTuples.addDelete( rightTuple );
                        break;
                        case PropagationContext.EXPIRATION:
                            // expirations must be handled serially
                            rightTuples.addDelete( rightTuple );
                            break loop;
View Full Code Here

                        case PropagationContext.RULE_REMOVAL:
                             rightTuples.addDelete( rightTuple );
                        break;
                        case PropagationContext.EXPIRATION:
                            // expirations must be handled serially
                            rightTuples.addDelete( rightTuple );
                            break loop;
                    }
                    que.removeFirst();
                    rightTuple = que.peekFirst();
                }
View Full Code Here

                case LeftTuple.UPDATE: {
                    rightTuples.removeUpdate(rightTuple);
                    break;
                }
            }
            rightTuples.addDelete(rightTuple);

            if (bns != null) {
                // Add peered RightTuples, they are attached to FH - unlink LeftTuples that has a peer ref
                for (int i = 0; i < length; i++) {
                    rightTuple = rightTuple.getHandleNext();
View Full Code Here

                        case LeftTuple.UPDATE: {
                            rightTuples.removeUpdate(rightTuple);
                            break;
                        }
                    }
                    rightTuples.addDelete(rightTuple);
                }
            }

            leftTuple.clearStaged();
            leftTuple = next;
View Full Code Here

        } else if ( stagedRightTuples.deleteSize() == 0 ) {
            // nothing staged before, notify rule, so it can evaluate network
            memory.getSegmentMemory().notifyRuleLinkSegment( wm );
        }
       
        stagedRightTuples.addDelete( rightTuple );
    }  
   
    public void doUpdateRightTuple(final RightTuple rightTuple,
                                    final InternalWorkingMemory wm,
                                    final BetaMemory memory) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.