Package org.drools.reteoo.FromNode

Examples of org.drools.reteoo.FromNode.FromMemory


                break;
            }
            case NodeTypeEnums.FromNode: {
                //              context.out.println( "FromNode" );
                // FNs generate new fact handles on-demand to wrap objects and need special procedures when serializing to persistent storage
                FromMemory memory = (FromMemory) context.wm.getNodeMemory( (NodeMemory) sink );

                memory.betaMemory.getLeftTupleMemory().add( parentLeftTuple );
                Map<Object, RightTuple> matches = new LinkedHashMap<Object, RightTuple>();
                parentLeftTuple.setObject( matches );
View Full Code Here


    }

    @SuppressWarnings("unchecked")
    private static ProtobufMessages.NodeMemory writeFromNodeMemory(final int nodeId,
            final Memory memory) {
        FromMemory fromMemory = (FromMemory) memory;

        if (fromMemory.betaMemory.getLeftTupleMemory().size() > 0) {
            ProtobufMessages.NodeMemory.FromNodeMemory.Builder _from = ProtobufMessages.NodeMemory.FromNodeMemory.newBuilder();

            final org.drools.core.util.Iterator tupleIter = fromMemory.betaMemory.getLeftTupleMemory().iterator();
View Full Code Here

                break;
            }
            case NodeTypeEnums.FromNode : {
                //context.out.println( ".... FromNode" );
                // FNs generate new fact handles on-demand to wrap objects and need special procedures when serializing to persistent storage
                FromMemory memory = (FromMemory) context.wm.getNodeMemory( (NodeMemory) sink );

                Map<Object, RightTuple> matches = (Map<Object, RightTuple>) leftTuple.getObject();
                for ( RightTuple rightTuples : matches.values() ) {
                    // first we serialize the generated fact handle ID
                    stream.writeShort( PersisterEnums.FACT_HANDLE );
View Full Code Here

                break;
            }
            case NodeTypeEnums.FromNode: {
//              context.out.println( "FromNode" );
                // FNs generate new fact handles on-demand to wrap objects and need special procedures when serializing to persistent storage
                FromMemory memory = (FromMemory) context.wm.getNodeMemory( (NodeMemory) sink );
               
                memory.betaMemory.getLeftTupleMemory().add( parentLeftTuple );               
                Map<Object, RightTuple> matches =  new LinkedHashMap<Object, RightTuple>();
                memory.betaMemory.getCreatedHandles().put( parentLeftTuple, matches );
               
View Full Code Here

                break;
            }
            case NodeTypeEnums.FromNode: {
              //context.out.println( ".... FromNode" );
              // FNs generate new fact handles on-demand to wrap objects and need special procedures when serializing to persistent storage
              FromMemory memory = (FromMemory) context.wm.getNodeMemory( (NodeMemory) sink );

              Map<Object, RightTuple> matches = (Map<Object, RightTuple>) memory.betaMemory.getCreatedHandles().get( leftTuple );
              for ( RightTuple rightTuples : matches.values() ) {
                  // first we serialize the generated fact handle ID
                  stream.writeShort( PersisterEnums.FACT_HANDLE );
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private static ProtobufMessages.NodeMemory writeFromNodeMemory(final int nodeId,
            final Memory memory) {
        FromMemory fromMemory = (FromMemory) memory;

        if (fromMemory.betaMemory.getLeftTupleMemory().size() > 0) {
            ProtobufMessages.NodeMemory.FromNodeMemory.Builder _from = ProtobufMessages.NodeMemory.FromNodeMemory.newBuilder();

            final org.drools.core.util.Iterator tupleIter = fromMemory.betaMemory.getLeftTupleMemory().iterator();
View Full Code Here

                break;
            }
            case NodeTypeEnums.FromNode: {
                //              context.out.println( "FromNode" );
                // FNs generate new fact handles on-demand to wrap objects and need special procedures when serializing to persistent storage
                FromMemory memory = (FromMemory) context.wm.getNodeMemory( (NodeMemory) sink );

                memory.betaMemory.getLeftTupleMemory().add( parentLeftTuple );
                Map<Object, RightTuple> matches = new LinkedHashMap<Object, RightTuple>();
                parentLeftTuple.setObject( matches );
View Full Code Here

                break;
            }
            case NodeTypeEnums.FromNode: {
                //              context.out.println( "FromNode" );
                // FNs generate new fact handles on-demand to wrap objects and need special procedures when serializing to persistent storage
                FromMemory memory = (FromMemory) context.wm.getNodeMemory( (NodeMemory) sink );

                memory.betaMemory.getLeftTupleMemory().add( parentLeftTuple );
                Map<Object, RightTuple> matches = new LinkedHashMap<Object, RightTuple>();
                parentLeftTuple.setObject( matches );
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  private static ProtobufMessages.NodeMemory writeFromNodeMemory(
      final int nodeId, final Memory memory) {
    FromMemory fromMemory = (FromMemory) memory;

    if (fromMemory.betaMemory.getLeftTupleMemory().size() > 0) {
      ProtobufMessages.NodeMemory.FromNodeMemory.Builder _from = ProtobufMessages.NodeMemory.FromNodeMemory
          .newBuilder();
View Full Code Here

                break;
            }
            case NodeTypeEnums.FromNode: {
                //              context.out.println( "FromNode" );
                // FNs generate new fact handles on-demand to wrap objects and need special procedures when serializing to persistent storage
                FromMemory memory = (FromMemory) context.wm.getNodeMemory( (MemoryFactory) sink );

                memory.betaMemory.getLeftTupleMemory().add( parentLeftTuple );
                Map<Object, RightTuple> matches = new LinkedHashMap<Object, RightTuple>();
                parentLeftTuple.setObject( matches );
View Full Code Here

TOP

Related Classes of org.drools.reteoo.FromNode.FromMemory

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.