Package java.io

Examples of java.io.ObjectOutputStream.writeShort()


                        stream.writeShort( PersisterEnums.RIGHT_TUPLE );
                        stream.writeInt( childLeftTuple.getRightParent().getFactHandle().getId() );
                    } else {
                        // this is a propagation record
//                        context.out.println( "RightTuple(propagation) int:" + childLeftTuple.getLeftTupleSink().getId() + " int:" + childLeftTuple.getRightParent().getFactHandle().getId() );
                        stream.writeShort( PersisterEnums.LEFT_TUPLE );
                        stream.writeInt( childLeftTuple.getLeftTupleSink().getId() );
                        writeLeftTuple( childLeftTuple,
                                        context,
                                        recurse );
                    }
View Full Code Here


                        writeLeftTuple( childLeftTuple,
                                        context,
                                        recurse );
                    }
                }
                stream.writeShort( PersisterEnums.END );
//                context.out.println( "CollectNode   ---   END" );
                break;
            }
            case NodeTypeEnums.RightInputAdaterNode : {
//                context.out.println( "RightInputAdapterNode" );
View Full Code Here

                stream.writeInt( ifh.getId() );
                stream.writeLong( ifh.getRecency() );
               
                writeRightTuples( ifh, context );

                stream.writeShort( PersisterEnums.END );
//                context.out.println( "RightInputAdapterNode   ---   END" );
                break;
            }
            case NodeTypeEnums.RuleTerminalNode : {
//                context.out.println( "RuleTerminalNode" );
View Full Code Here

        //Map<LeftTuple, Integer> tuples = context.terminalTupleMap;
        if ( entries.length != 0 ) {
            for ( Entry<LeftTuple, Integer> entry : entries ) {
                if (entry.getKey().getActivation() != null) {
          LeftTuple leftTuple = entry.getKey();
          stream.writeShort(PersisterEnums.ACTIVATION);
          writeActivation(context, leftTuple, (AgendaItem) leftTuple
              .getActivation(), (RuleTerminalNode) leftTuple
              .getLeftTupleSink());
        }
            }
View Full Code Here

              .getActivation(), (RuleTerminalNode) leftTuple
              .getLeftTupleSink());
        }
            }
        }
        stream.writeShort( PersisterEnums.END );
    }

    public static class TupleSorter
        implements
        Comparator<Entry<LeftTuple, Integer>> {
View Full Code Here

//        context.out.println( "AgendaItem bool:" + agendaItem.isActivated() );

        org.drools.util.LinkedList list = agendaItem.getLogicalDependencies();
        if ( list != null && !list.isEmpty() ) {
            for ( LogicalDependency node = (LogicalDependency) list.getFirst(); node != null; node = (LogicalDependency) node.getNext() ) {
                stream.writeShort( PersisterEnums.LOGICAL_DEPENDENCY );
                stream.writeInt( ((InternalFactHandle) node.getFactHandle()).getId() );
//                context.out.println( "Logical Depenency : int " + ((InternalFactHandle) node.getFactHandle()).getId() );
            }
        }
        stream.writeShort( PersisterEnums.END );
View Full Code Here

                stream.writeShort( PersisterEnums.LOGICAL_DEPENDENCY );
                stream.writeInt( ((InternalFactHandle) node.getFactHandle()).getId() );
//                context.out.println( "Logical Depenency : int " + ((InternalFactHandle) node.getFactHandle()).getId() );
            }
        }
        stream.writeShort( PersisterEnums.END );
    }

    public static void writePropagationContexts(MarshallerWriteContext context) throws IOException {
        ObjectOutputStream stream = context.stream;
View Full Code Here

                LeftTuple leftTuple = entry.getKey();
                if (leftTuple.getActivation() != null) {
          PropagationContext pc = leftTuple.getActivation()
              .getPropagationContext();
          if (!pcMap.containsKey(pc.getPropagationNumber())) {
            stream.writeShort(PersisterEnums.PROPAGATION_CONTEXT);
            writePropagationContext(context, pc);
            pcMap.put(pc.getPropagationNumber(), pc);
          }
        }
            }
View Full Code Here

          }
        }
            }
        }

        stream.writeShort( PersisterEnums.END );
    }

    public static void writePropagationContext(MarshallerWriteContext context,
                                               PropagationContext pc) throws IOException {
        ObjectOutputStream stream = context.stream;
View Full Code Here

                                  org.drools.runtime.process.ProcessInstance o2) {
                                  return (int) (o1.getId() - o2.getId());
                              }
                          } );
        for ( org.drools.runtime.process.ProcessInstance processInstance : processInstances ) {
            stream.writeShort( PersisterEnums.PROCESS_INSTANCE );
            writeProcessInstance( context,
                                  (RuleFlowProcessInstance) processInstance );
        }
        stream.writeShort( PersisterEnums.END );
    }
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.