Package java.io

Examples of java.io.ObjectInputStream.readShort()


    }

    public static void readRightTuples( InternalFactHandle factHandle,
            MarshallerReaderContext context ) throws IOException {
        ObjectInputStream stream = context.stream;
        while (stream.readShort() == PersisterEnums.RIGHT_TUPLE) {
            readRightTuple( context,
                            factHandle );
        }
    }
View Full Code Here


    public static void readLeftTuples( MarshallerReaderContext context ) throws IOException,
            ClassNotFoundException {
        ObjectInputStream stream = context.stream;

        while (stream.readShort() == PersisterEnums.LEFT_TUPLE) {
            int nodeId = stream.readInt();
            LeftTupleSink sink = (LeftTupleSink) context.sinks.get( nodeId );
            int factHandleId = stream.readInt();
            LeftTuple leftTuple = sink.createLeftTuple( context.handles.get( factHandleId ),
                                                        sink,
View Full Code Here

            case NodeTypeEnums.JoinNode: {
                BetaMemory memory = (BetaMemory) context.wm.getNodeMemory( (BetaNode) sink );
                addToLeftMemory( parentLeftTuple,
                                 memory );

                while (stream.readShort() == PersisterEnums.RIGHT_TUPLE) {
                    int childSinkId = stream.readInt();
                    LeftTupleSink childSink = (LeftTupleSink) sinks.get( childSinkId );
                    int factHandleId = stream.readInt();
                    RightTupleKey key = new RightTupleKey( factHandleId,
                                                           sink );
View Full Code Here

                }
                break;

            }
            case NodeTypeEnums.EvalConditionNode: {
                while (stream.readShort() == PersisterEnums.LEFT_TUPLE) {
                    LeftTupleSink childSink = (LeftTupleSink) sinks.get( stream.readInt() );
                    LeftTuple childLeftTuple = childSink.createLeftTuple( parentLeftTuple,
                                                                          childSink,
                                                                          true );
                    readLeftTuple( childLeftTuple,
View Full Code Here

        ObjectInputStream stream = context.stream;

        agenda.setDormantActivations( stream.readInt() );
        agenda.setActiveActivations( stream.readInt() );

        while (stream.readShort() == PersisterEnums.AGENDA_GROUP) {
            BinaryHeapQueueAgendaGroup group = new BinaryHeapQueueAgendaGroup( stream.readUTF(),
                                                                               context.ruleBase );
            group.setActive( stream.readBoolean() );
            agenda.getAgendaGroupsMap().put( group.getName(),
                                             group );
View Full Code Here

            group.setActive( stream.readBoolean() );
            agenda.getAgendaGroupsMap().put( group.getName(),
                                             group );
        }

        while (stream.readShort() == PersisterEnums.AGENDA_GROUP) {
            String agendaGroupName = stream.readUTF();
            agenda.addAgendaGroupOnStack( agenda.getAgendaGroup( agendaGroupName ) );
        }

        while (stream.readShort() == PersisterEnums.RULE_FLOW_GROUP) {
View Full Code Here

        while (stream.readShort() == PersisterEnums.AGENDA_GROUP) {
            String agendaGroupName = stream.readUTF();
            agenda.addAgendaGroupOnStack( agenda.getAgendaGroup( agendaGroupName ) );
        }

        while (stream.readShort() == PersisterEnums.RULE_FLOW_GROUP) {
            String rfgName = stream.readUTF();
            boolean active = stream.readBoolean();
            boolean autoDeactivate = stream.readBoolean();
            RuleFlowGroupImpl rfg = new RuleFlowGroupImpl( rfgName,
                                                           active,
View Full Code Here

    public static void readTruthMaintenanceSystem( MarshallerReaderContext context ) throws IOException {
        ObjectInputStream stream = context.stream;

        TruthMaintenanceSystem tms = context.wm.getTruthMaintenanceSystem();
        while (stream.readShort() == PersisterEnums.EQUALITY_KEY) {
            int status = stream.readInt();
            int factHandleId = stream.readInt();
            InternalFactHandle handle = (InternalFactHandle) context.handles.get( factHandleId );

            // ObjectTypeConf state is not marshalled, so it needs to be re-determined
View Full Code Here

            }

            EqualityKey key = new EqualityKey( handle,
                                               status );
            handle.setEqualityKey( key );
            while (stream.readShort() == PersisterEnums.FACT_HANDLE) {
                factHandleId = stream.readInt();
                handle = (InternalFactHandle) context.handles.get( factHandleId );
                key.addFactHandle( handle );
                handle.setEqualityKey( key );
            }
View Full Code Here

    }

    public static void readRightTuples( InternalFactHandle factHandle,
            MarshallerReaderContext context ) throws IOException {
        ObjectInputStream stream = context.stream;
        while (stream.readShort() == PersisterEnums.RIGHT_TUPLE) {
            readRightTuple( context,
                            factHandle );
        }
    }
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.