Package java.io

Examples of java.io.ObjectInputStream.readInt()


    public static void readAgenda( MarshallerReaderContext context,
            DefaultAgenda agenda ) throws IOException {
        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 );
View Full Code Here


    public static void readAgenda( MarshallerReaderContext context,
            DefaultAgenda agenda ) throws IOException {
        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() );
View Full Code Here

            RuleFlowGroupImpl rfg = new RuleFlowGroupImpl( rfgName,
                                                           active,
                                                           autoDeactivate );
            agenda.getRuleFlowGroupsMap().put( rfgName,
                                               rfg );
            int nbNodeInstances = stream.readInt();
            for (int i = 0; i < nbNodeInstances; i++) {
                Long processInstanceId = stream.readLong();
                String nodeInstanceId = stream.readUTF();
                rfg.addNodeInstance( processInstanceId,
                                     nodeInstanceId );
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
            ObjectTypeConf typeConf = context.wm.getObjectTypeConfigurationRegistry().getObjectTypeConf( context.wm.getEntryPoint(),
View Full Code Here

        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
            ObjectTypeConf typeConf = context.wm.getObjectTypeConfigurationRegistry().getObjectTypeConf( context.wm.getEntryPoint(),
                                                                                                         handle.getObject() );
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 );
            }
            tms.put( key );
View Full Code Here

            ObjectStore objectStore ) throws IOException,
            ClassNotFoundException {
        ObjectInputStream stream = context.stream;
        InternalWorkingMemory wm = context.wm;

        int size = stream.readInt();

        // load the handles
        InternalFactHandle[] handles = new InternalFactHandle[size];
        for (int i = 0; i < size; i++) {
            InternalFactHandle handle = readFactHandle( context );
View Full Code Here

    public static void readRightTuple( MarshallerReaderContext context,
            InternalFactHandle factHandle ) throws IOException {
        ObjectInputStream stream = context.stream;

        int sinkId = stream.readInt();
        RightTupleSink sink = ( sinkId >= 0 ) ? (RightTupleSink) context.sinks.get( sinkId ) : null;

        RightTuple rightTuple = new RightTuple( factHandle,
                                                sink );
        context.rightTuples.put( new RightTupleKey( factHandle.getId(),
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,
                                                        true );
View Full Code Here

        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,
                                                        true );
            readLeftTuple( leftTuple,
                           context );
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.