Examples of SynchronizedLeftTupleSets


Examples of org.drools.core.common.SynchronizedLeftTupleSets

        smem.setPos(counter);

        if (smem.getRootNode().getType() != NodeTypeEnums.LeftInputAdapterNode &&
            ((LeftTupleSource)smem.getRootNode()).getLeftTupleSource().getType() == NodeTypeEnums.LeftInputAdapterNode ) {
                // If LiaNode is in it's own segment, then the segment first after that must use SynchronizedLeftTupleSets
                smem.setStagedTuples( new SynchronizedLeftTupleSets() );
        }

        updateRiaAndTerminalMemory(tupleSource, tupleSource, smem, wm, false);

        ((ReteooRuleBase)wm.getRuleBase()).registerSegmentPrototype(segmentRoot, smem);
View Full Code Here

Examples of org.drools.core.common.SynchronizedLeftTupleSets

        tnMem.setSegmentMemory(smem);
    }

    private static long processLiaNode(LeftInputAdapterNode tupleSource, InternalWorkingMemory wm, SegmentMemory smem, long nodePosMask, long allLinkedTestMask) {
        LiaNodeMemory liaMemory = (LiaNodeMemory) smem.createNodeMemory((LeftInputAdapterNode) tupleSource, wm);
        smem.setStagedTuples( new SynchronizedLeftTupleSets() ); // LiaNode SegmentMemory must have Synchronized LeftTupleSets
        liaMemory.setSegmentMemory(smem);
        liaMemory.setNodePosMaskBit(nodePosMask);
        allLinkedTestMask = allLinkedTestMask | nodePosMask;
        return allLinkedTestMask;
    }
View Full Code Here

Examples of org.drools.core.common.SynchronizedLeftTupleSets

            // RTNS and RiaNode's have their own segment, if they are the child of a split.
            if (memory.getSegmentMemory() == null) {
                SegmentMemory childSmem = new SegmentMemory(sink); // rtns or riatns don't need a queue
                if ( sink.getLeftTupleSource().getType() == NodeTypeEnums.LeftInputAdapterNode ) {
                    // If LiaNode is in it's own segment, then the segment first after that must use SynchronizedLeftTupleSets
                    childSmem.setStagedTuples( new SynchronizedLeftTupleSets() );
                }

                PathMemory pmem;
                if (NodeTypeEnums.isTerminalNode(sink)) {
                    pmem = (PathMemory) memory;
View Full Code Here

Examples of org.drools.core.common.SynchronizedLeftTupleSets

             SegmentMemory newSmem = SegmentUtilities.createChildSegment(wm, peerLts, memory);
             sm.add(newSmem);

             if ( sm.getTipNode().getType() == NodeTypeEnums.LeftInputAdapterNode ) {
                 // If LiaNode is in it's own segment, then the segment first after that must use SynchronizedLeftTupleSets
                 newSmem.setStagedTuples( new SynchronizedLeftTupleSets() );
             }
         }

         Memory memory = wm.getNodeMemory((MemoryFactory) peerLts);
         SegmentMemory newSmem = SegmentUtilities.createChildSegment(wm, peerLts, memory);
         sm.add(newSmem);

         if ( sm.getTipNode().getType() == NodeTypeEnums.LeftInputAdapterNode ) {
             // If LiaNode is in it's own segment, then the segment first after that must use SynchronizedLeftTupleSets
             newSmem.setStagedTuples( new SynchronizedLeftTupleSets() );
         }

         LeftTupleSource lts;
         if ( NodeTypeEnums.isTerminalNode(sm.getTipNode() ) ) {
             // if tip is RTN, then use parent
View Full Code Here

Examples of org.drools.core.common.SynchronizedLeftTupleSets

         // re-assigned tip nodes
         sm2.setTipNode(sm1.getTipNode());
         sm1.setTipNode( splitNode ); // splitNode is now tip of original segment

         if ( sm1.getTipNode().getType() == NodeTypeEnums.LeftInputAdapterNode ) {
             sm2.setStagedTuples( new SynchronizedLeftTupleSets() ); // and the LeftTuples must be Synchronized, for thread safety
             if !sm1.getStagedLeftTuples().isEmpty() ) {
                 // Segments with only LiaNode's cannot have staged LeftTuples, so move them down to the new Segment
                sm2.getStagedLeftTuples().addAll(sm1.getStagedLeftTuples());
             }
         }
View Full Code Here

Examples of org.drools.core.common.SynchronizedLeftTupleSets

                Queue<TupleEntry> queue = SegmentUtilities.initAndGetTupleQueue(smem.getTipNode(), wm);
                smem.setTupleQueue( queue );
            }

            if (hasSyncStagedLeftTuple) {
                smem.setStagedTuples( new SynchronizedLeftTupleSets() );
            }
            return smem;
        }
View Full Code Here

Examples of org.drools.core.common.SynchronizedLeftTupleSets

            smem.setPos(counter);

            if (smem.getRootNode().getType() != NodeTypeEnums.LeftInputAdapterNode &&
                ((LeftTupleSource)smem.getRootNode()).getLeftTupleSource().getType() == NodeTypeEnums.LeftInputAdapterNode ) {
                    // If LiaNode is in it's own segment, then the segment first after that must use SynchronizedLeftTupleSets
                    smem.setStagedTuples( new SynchronizedLeftTupleSets() );
            }

            nodeTypesInSegment = updateRiaAndTerminalMemory(tupleSource, tupleSource, smem, wm, false, nodeTypesInSegment);

            ((KnowledgeBaseImpl)wm.getKnowledgeBase()).registerSegmentPrototype(segmentRoot, smem);
View Full Code Here

Examples of org.drools.core.common.SynchronizedLeftTupleSets

        tnMem.setSegmentMemory(smem);
    }

    private static long processLiaNode(LeftInputAdapterNode tupleSource, InternalWorkingMemory wm, SegmentMemory smem, long nodePosMask, long allLinkedTestMask) {
        LiaNodeMemory liaMemory = (LiaNodeMemory) smem.createNodeMemory(tupleSource, wm);
        smem.setStagedTuples( new SynchronizedLeftTupleSets() ); // LiaNode SegmentMemory must have Synchronized LeftTupleSets
        liaMemory.setSegmentMemory(smem);
        liaMemory.setNodePosMaskBit(nodePosMask);
        allLinkedTestMask = allLinkedTestMask | nodePosMask;
        return allLinkedTestMask;
    }
View Full Code Here

Examples of org.drools.core.common.SynchronizedLeftTupleSets

            // RTNS and RiaNode's have their own segment, if they are the child of a split.
            if (memory.getSegmentMemory() == null) {
                SegmentMemory childSmem = new SegmentMemory(sink); // rtns or riatns don't need a queue
                if ( sink.getLeftTupleSource().getType() == NodeTypeEnums.LeftInputAdapterNode ) {
                    // If LiaNode is in it's own segment, then the segment first after that must use SynchronizedLeftTupleSets
                    childSmem.setStagedTuples( new SynchronizedLeftTupleSets() );
                }

                PathMemory pmem;
                if (NodeTypeEnums.isTerminalNode(sink)) {
                    pmem = (PathMemory) memory;
View Full Code Here

Examples of org.drools.core.common.SynchronizedLeftTupleSets

             SegmentMemory newSmem = SegmentUtilities.createChildSegment(wm, peerLts, memory);
             sm.add(newSmem);

             if ( sm.getTipNode().getType() == NodeTypeEnums.LeftInputAdapterNode ) {
                 // If LiaNode is in it's own segment, then the segment first after that must use SynchronizedLeftTupleSets
                 newSmem.setStagedTuples( new SynchronizedLeftTupleSets() );
             }
         }

         Memory memory = wm.getNodeMemory((MemoryFactory) peerLts);
         SegmentMemory newSmem = SegmentUtilities.createChildSegment(wm, peerLts, memory);
         sm.add(newSmem);

         if ( sm.getTipNode().getType() == NodeTypeEnums.LeftInputAdapterNode ) {
             // If LiaNode is in it's own segment, then the segment first after that must use SynchronizedLeftTupleSets
             newSmem.setStagedTuples( new SynchronizedLeftTupleSets() );
         }

         LeftTupleSource lts;
         if ( NodeTypeEnums.isTerminalNode(sm.getTipNode() ) ) {
             // if tip is RTN, then use parent
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.