Package org.drools.common

Examples of org.drools.common.Memory


    public void setTipNode(LeftTupleSource tipNode) {
        this.tipNode = tipNode;
    }

    public Memory createNodeMemory(MemoryFactory memoryFactory, InternalWorkingMemory wm) {
        Memory memory = wm.getNodeMemory( memoryFactory );       
        nodeMemories.add( memory );
        return memory;
    }
View Full Code Here


        StagedLeftTuples trgTuples = new StagedLeftTuples();
        StagedLeftTuples srcTuples = smem.getStagedLeftTuples();
        pLiaNode.doNode( liaNode, liaNodeMemory, wm, srcTuples, trgTuples );

        LeftTupleSource node = null;
        Memory nodeMem = null;
        if ( liaNode == smem.getTipNode() ) {
            // Segment only contains LiaNode, so need to propagate peers
            SegmentPropagator.propagate( smem, trgTuples, wm );
            smem = smems[smemIndex]; // 1
            nodeMem = smem.getNodeMemories().getFirst();
View Full Code Here

        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 : {
                        _node = writeAccumulateNodeMemory( i, memory );
                        break;
                    }
                    case NodeTypeEnums.RightInputAdaterNode : {
View Full Code Here

        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 : {
                        _node = writeAccumulateNodeMemory( i, memory );
                        break;
                    }
                    case NodeTypeEnums.RightInputAdaterNode : {
View Full Code Here

        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: {
                        _node = writeAccumulateNodeMemory(i, memory);
                        break;
                    }
                    case NodeTypeEnums.RightInputAdapterNode: {
View Full Code Here

     */
    public void updateSink( final LeftTupleSink sink,
                            final PropagationContext context,
                            final InternalWorkingMemory workingMemory ) {

        Memory m = workingMemory.getNodeMemory( this );
        BetaMemory memory = null;
        if (m instanceof BetaMemory) {
            memory = (BetaMemory) m;
        } else {
            workingMemory.getNodeMemory( this );
View Full Code Here

       
        if ( sourceSegment.isEmpty() ) {
            // We know it's a Composite 
            LeftTupleSinkNodeList list = ((CompositeLeftTupleSinkAdapter)source.getSinkPropagator()).getRawSinks();
            for (LeftTupleSinkNode sink = list.getFirst(); sink != null; sink = sink.getNextLeftTupleSinkNode() ) {
                Memory memory = wm.getNodeMemories().getNodeMemory( ( MemoryFactory ) sink );
                SegmentMemory smem = memory.getSegmentMemory();
                sourceSegment.add( smem );
            }
        }
               
        processPeers(sourceSegment, stagedLeftTuples);
View Full Code Here

        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: {
                        _node = writeAccumulateNodeMemory(i, memory);
                        break;
                    }
                    case NodeTypeEnums.RightInputAdapterNode: {
View Full Code Here

    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: {
          _node = writeAccumulateNodeMemory(i, memory);
          break;
        }
        case NodeTypeEnums.RightInputAdaterNode: {
View Full Code Here

        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 : {
                        _node = writeAccumulateNodeMemory( i, memory );
                        break;
                    }
                    case NodeTypeEnums.RightInputAdaterNode : {
View Full Code Here

TOP

Related Classes of org.drools.common.Memory

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.