Package org.drools.core.common

Examples of org.drools.core.common.NodeMemories


    }

    private static void writeNodeMemories(MarshallerWriteContext context,
                                          ProtobufMessages.RuleData.Builder _ksb) throws IOException {
        InternalWorkingMemory wm = context.wm;
        NodeMemories memories = wm.getNodeMemories();
        // only some of the node memories require special serialization handling
        // so we iterate over all of them and process only those that require it
        for ( int i = 0; i < memories.length(); i++ ) {
            Memory memory = memories.peekNodeMemory( i );
            // some nodes have no memory, so we need to check for nulls
            if ( memory != null ) {
                ProtobufMessages.NodeMemory _node = null;
                switch ( memory.getNodeType() ) {
                    case NodeTypeEnums.AccumulateNode : {
View Full Code Here


    }

    private static void writeNodeMemories(MarshallerWriteContext context,
                                          ProtobufMessages.RuleData.Builder _ksb) throws IOException {
        InternalWorkingMemory wm = context.wm;
        NodeMemories memories = wm.getNodeMemories();
        // only some of the node memories require special serialization handling
        // so we iterate over all of them and process only those that require it
        for ( int i = 0; i < memories.length(); i++ ) {
            Memory memory = memories.peekNodeMemory( i );
            // some nodes have no memory, so we need to check for nulls
            if ( memory != null ) {
                ProtobufMessages.NodeMemory _node = null;
                switch ( memory.getNodeType() ) {
                    case NodeTypeEnums.AccumulateNode : {
View Full Code Here

    }

    private static void writeNodeMemories(MarshallerWriteContext context,
                                          ProtobufMessages.RuleData.Builder _ksb) throws IOException {
        InternalWorkingMemory wm = context.wm;
        NodeMemories memories = wm.getNodeMemories();
        // only some of the node memories require special serialization handling
        // so we iterate over all of them and process only those that require it
        for ( int i = 0; i < memories.length(); i++ ) {
            Memory memory = memories.peekNodeMemory( i );
            // some nodes have no memory, so we need to check for nulls
            if ( memory != null ) {
                ProtobufMessages.NodeMemory _node = null;
                switch ( memory.getNodeType() ) {
                    case NodeTypeEnums.AccumulateNode : {
View Full Code Here

    }

    private static void writeNodeMemories(MarshallerWriteContext context,
                                          ProtobufMessages.RuleData.Builder _ksb) throws IOException {
        InternalWorkingMemory wm = context.wm;
        NodeMemories memories = wm.getNodeMemories();
        // only some of the node memories require special serialization handling
        // so we iterate over all of them and process only those that require it
        for ( int i = 0; i < memories.length(); i++ ) {
            Memory memory = memories.peekNodeMemory( i );
            // some nodes have no memory, so we need to check for nulls
            if ( memory != null ) {
                ProtobufMessages.NodeMemory _node = null;
                switch ( memory.getNodeType() ) {
                    case NodeTypeEnums.AccumulateNode : {
View Full Code Here

        ksession.fireAllRules();
        assertEquals("FactCount should still be 0[2]", 0, ksession.getFactCount());

        ((DefaultAgenda)ksession.getAgenda()).getGarbageCollector().forceGcUnlinkedRules();

        NodeMemories nm = ( (StatefulKnowledgeSessionImpl) ksession ).getNodeMemories();
        for ( int j = 0; j < nm.length(); j++ ) {
            Memory mem = nm.peekNodeMemory( j );
            if ( mem != null && mem instanceof PathMemory) {
                PathMemory pathMemory = (PathMemory) mem;
                StreamTupleEntryQueue kiu = pathMemory.getStreamQueue();
                System.out.println( kiu + " >> " + kiu.size() );
                assertEquals( 0, kiu.size() );
View Full Code Here

    }

    private static void writeNodeMemories(MarshallerWriteContext context,
                                          ProtobufMessages.RuleData.Builder _ksb) throws IOException {
        InternalWorkingMemory wm = context.wm;
        NodeMemories memories = wm.getNodeMemories();
        // only some of the node memories require special serialization handling
        // so we iterate over all of them and process only those that require it
        for ( int i = 0; i < memories.length(); i++ ) {
            Memory memory = memories.peekNodeMemory( i );
            // some nodes have no memory, so we need to check for nulls
            if ( memory != null ) {
                ProtobufMessages.NodeMemory _node = null;
                switch ( memory.getNodeType() ) {
                    case NodeTypeEnums.AccumulateNode : {
View Full Code Here

    }

    private static void writeNodeMemories(MarshallerWriteContext context,
                                          ProtobufMessages.RuleData.Builder _ksb) throws IOException {
        InternalWorkingMemory wm = context.wm;
        NodeMemories memories = wm.getNodeMemories();
        // only some of the node memories require special serialization handling
        // so we iterate over all of them and process only those that require it
        for ( int i = 0; i < memories.length(); i++ ) {
            Memory memory = memories.peekNodeMemory( i );
            // some nodes have no memory, so we need to check for nulls
            if ( memory != null ) {
                ProtobufMessages.NodeMemory _node = null;
                switch ( memory.getNodeType() ) {
                    case NodeTypeEnums.AccumulateNode : {
View Full Code Here

        BetaMemory eMem = ( BetaMemory ) sm.getNodeMemories().get(4);
        assertEquals( 1, eMem.getLeftTupleMemory().size() );
        assertEquals( 1, eMem.getRightTupleMemory().size() );

        NodeMemories nms = wm.getNodeMemories();
        assertEquals( 13, countNodeMemories(nms));

        assertEquals(0, sm.getStagedLeftTuples().insertSize());
        assertEquals(1, list.size() );
View Full Code Here

        BetaMemory eMem = ( BetaMemory ) sm.getNodeMemories().get(4);
        assertEquals( 1, eMem.getLeftTupleMemory().size() );
        assertEquals( 1, eMem.getRightTupleMemory().size() );

        NodeMemories nms = wm.getNodeMemories();
        assertEquals( 13, countNodeMemories(nms));

        assertEquals(0, sm.getStagedLeftTuples().insertSize());
        assertEquals(1, list.size() );
View Full Code Here

        BetaMemory eMem = ( BetaMemory ) sm.getNodeMemories().get(4);
        assertEquals( 1, eMem.getLeftTupleMemory().size() );
        assertEquals( 1, eMem.getRightTupleMemory().size() );

        NodeMemories nms = wm.getNodeMemories();
        assertEquals( 13, countNodeMemories(nms));

        assertEquals(0, sm.getStagedLeftTuples().insertSize());
        assertEquals(1, list.size() );
View Full Code Here

TOP

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

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.