Package org.drools.core.common

Examples of org.drools.core.common.RightTupleSets


                           InternalWorkingMemory wm,
                           LeftTupleSets srcLeftTuples,
                           LeftTupleSets trgLeftTuples,
                           LeftTupleSets stagedLeftTuples) {

            RightTupleSets srcRightTuples = bm.getStagedRightTuples();

            if (srcRightTuples.getDeleteFirst() != null) {
                doRightDeletes(joinNode, bm, wm, srcRightTuples, trgLeftTuples, stagedLeftTuples);
            }

            if (srcLeftTuples.getDeleteFirst() != null) {
                doLeftDeletes(joinNode, bm, wm, srcLeftTuples, trgLeftTuples, stagedLeftTuples);
            }

            if (srcLeftTuples.getUpdateFirst() != null || srcRightTuples.getUpdateFirst() != null) {
                dpUpdatesReorderLeftMemory(bm, wm,
                                           srcRightTuples, srcLeftTuples);
                dpUpdatesReorderRightMemory(bm, wm,
                                            srcRightTuples, srcLeftTuples);
            }

            if (srcRightTuples.getUpdateFirst() != null) {
                doRightUpdates(joinNode, sink, bm, wm, srcRightTuples, trgLeftTuples, stagedLeftTuples);
            }

            if (srcLeftTuples.getUpdateFirst() != null) {
                doLeftUpdates(joinNode, sink, bm, wm, srcLeftTuples, trgLeftTuples, stagedLeftTuples);
            }

            if (srcRightTuples.getInsertFirst() != null) {
                doRightInserts(joinNode, sink, bm, wm, srcRightTuples, trgLeftTuples);
            }

            if (srcLeftTuples.getInsertFirst() != null) {
                doLeftInserts(joinNode, sink, bm, wm, srcLeftTuples, trgLeftTuples);
            }

            srcRightTuples.resetAll();
            srcLeftTuples.resetAll();
        }
View Full Code Here


        }

        assertNotNull(joinNode);
        InternalWorkingMemory wm = (InternalWorkingMemory)ksession;
        BetaMemory memory = (BetaMemory)wm.getNodeMemory(joinNode);
        RightTupleSets stagedRightTuples = memory.getStagedRightTuples();
        assertEquals(0, stagedRightTuples.deleteSize());
        assertNull(stagedRightTuples.getDeleteFirst());
        assertEquals(0, stagedRightTuples.insertSize());
        assertNull(stagedRightTuples.getInsertFirst());
    }
View Full Code Here

        }

        assertNotNull(joinNode);
        InternalWorkingMemory wm = (InternalWorkingMemory)ksession;
        BetaMemory memory = (BetaMemory)wm.getNodeMemory(joinNode);
        RightTupleSets stagedRightTuples = memory.getStagedRightTuples();
        assertEquals(0, stagedRightTuples.deleteSize());
        assertNull(stagedRightTuples.getDeleteFirst());
        assertEquals(0, stagedRightTuples.insertSize());
        assertNull(stagedRightTuples.getInsertFirst());
    }
View Full Code Here

        assertNotNull(joinNode);
        InternalWorkingMemory wm = (InternalWorkingMemory)ksession;
        BetaMemory memory = (BetaMemory)wm.getNodeMemory(joinNode);
        assertEquals(0, memory.getSegmentMemory().getStreamQueue().size());

        RightTupleSets stagedRightTuples = memory.getStagedRightTuples();
        assertEquals(0, stagedRightTuples.deleteSize());
        assertEquals(0, stagedRightTuples.insertSize());
    }
View Full Code Here

        assertNotNull(joinNode);
        InternalWorkingMemory wm = (InternalWorkingMemory)ksession;
        BetaMemory memory = (BetaMemory)wm.getNodeMemory(joinNode);
        assertEquals(0, memory.getSegmentMemory().getStreamQueue().size());

        RightTupleSets stagedRightTuples = memory.getStagedRightTuples();
        assertEquals(0, stagedRightTuples.deleteSize());
        assertEquals(4, stagedRightTuples.insertSize());

        ksession.insert(new Long(0));
        ksession.fireAllRules();

        assertEquals(3, list.size());
View Full Code Here

        assertNotNull(joinNode);
        InternalWorkingMemory wm = (InternalWorkingMemory)ksession;
        BetaMemory memory = (BetaMemory)wm.getNodeMemory(joinNode);
        assertEquals(0, memory.getSegmentMemory().getStreamQueue().size());

        RightTupleSets stagedRightTuples = memory.getStagedRightTuples();
        assertEquals(4, stagedRightTuples.deleteSize());
        assertEquals(0, stagedRightTuples.insertSize());

        ksession.insert("");
        ksession.fireAllRules();

        assertEquals(0, stagedRightTuples.deleteSize());
        assertEquals(0, stagedRightTuples.insertSize());

        System.out.println(list);

        assertEquals(5, list.size());
        assertTrue(list.containsAll(Arrays.asList(1, 3, 5, 7, 9)));
View Full Code Here

        }

        assertNotNull(joinNode);
        InternalWorkingMemory wm = ((StatefulKnowledgeSessionImpl)ksession).session;
        BetaMemory memory = (BetaMemory)wm.getNodeMemory(joinNode);
        RightTupleSets stagedRightTuples = memory.getStagedRightTuples();
        assertEquals(0, stagedRightTuples.deleteSize());
        assertNull(stagedRightTuples.getDeleteFirst());
        assertEquals(0, stagedRightTuples.insertSize());
        assertNull(stagedRightTuples.getInsertFirst());
    }
View Full Code Here

        assertNotNull(joinNode);
        InternalWorkingMemory wm = (InternalWorkingMemory)ksession;
        BetaMemory memory = (BetaMemory)wm.getNodeMemory(joinNode);
        assertEquals(0, memory.getSegmentMemory().getStreamQueue().size());

        RightTupleSets stagedRightTuples = memory.getStagedRightTuples();
        assertEquals(0, stagedRightTuples.deleteSize());
        assertEquals(0, stagedRightTuples.insertSize());
    }
View Full Code Here

        assertNotNull(joinNode);
        InternalWorkingMemory wm = (InternalWorkingMemory)ksession;
        BetaMemory memory = (BetaMemory)wm.getNodeMemory(joinNode);
        assertEquals(0, memory.getSegmentMemory().getStreamQueue().size());

        RightTupleSets stagedRightTuples = memory.getStagedRightTuples();
        assertEquals(0, stagedRightTuples.deleteSize());
        assertEquals(4, stagedRightTuples.insertSize());

        ksession.insert(new Long(0));
        ksession.fireAllRules();

        assertEquals(3, list.size());
View Full Code Here

        assertNotNull(joinNode);
        InternalWorkingMemory wm = (InternalWorkingMemory)ksession;
        BetaMemory memory = (BetaMemory)wm.getNodeMemory(joinNode);
        assertEquals(0, memory.getSegmentMemory().getStreamQueue().size());

        RightTupleSets stagedRightTuples = memory.getStagedRightTuples();
        assertEquals(4, stagedRightTuples.deleteSize());
        assertEquals(0, stagedRightTuples.insertSize());

        ksession.insert("");
        ksession.fireAllRules();

        assertEquals(0, stagedRightTuples.deleteSize());
        assertEquals(0, stagedRightTuples.insertSize());

        System.out.println(list);

        assertEquals(5, list.size());
        assertTrue(list.containsAll(Arrays.asList(1, 3, 5, 7, 9)));
View Full Code Here

TOP

Related Classes of org.drools.core.common.RightTupleSets

Copyright © 2018 www.massapicom. 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.