public static void readTimer( MarshallerReaderContext inCtx ) throws IOException, ClassNotFoundException { short timerType = inCtx.readShort(); TimersInputMarshaller reader = inCtx.readersByInt.get( timerType ); reader.read( inCtx ); }
public static void readActionQueue( MarshallerReaderContext context ) throws IOException, ClassNotFoundException { ReteooWorkingMemory wm = (ReteooWorkingMemory) context.wm; Queue<WorkingMemoryAction> actionQueue = wm.getActionQueue(); while (context.readShort() == PersisterEnums.WORKING_MEMORY_ACTION) { actionQueue.offer( PersisterHelper.readWorkingMemoryAction( context ) ); } }
public static void readBehaviors( WindowNode windowNode, WindowMemory memory, MarshallerReaderContext inCtx ) throws IOException { short token = -1; while (( token = inCtx.readShort() ) != PersisterEnums.END) { int i = inCtx.readInt(); Object object = ( (Object[]) memory.behaviorContext )[i]; switch (token) { case PersisterEnums.SLIDING_TIME_WIN: { readSlidingTimeWindowBehaviour( windowNode, memory, (SlidingTimeWindow) windowNode.getBehaviors()[i], (SlidingTimeWindowContext) object, inCtx ); break; } case PersisterEnums.SLIDING_LENGTH_WIN: { readSlidingLengthWindowBehaviour( windowNode, memory, (SlidingLengthWindow) windowNode.getBehaviors()[i], (SlidingLengthWindowContext) object, inCtx ); break; } } } }
public static WorkingMemoryAction readWorkingMemoryAction(MarshallerReaderContext context) throws IOException, ClassNotFoundException { int type = context.readShort(); switch ( type ) { case WorkingMemoryAction.WorkingMemoryReteAssertAction : { return new WorkingMemoryReteAssertAction( context ); } case WorkingMemoryAction.DeactivateCallback : { return new DeactivateCallback( context ); } case WorkingMemoryAction.PropagateAction : { return new PropagateAction( context ); } case WorkingMemoryAction.LogicalRetractCallback : { return new LogicalRetractCallback( context ); } case WorkingMemoryAction.WorkingMemoryReteExpireAction : { return new WorkingMemoryReteExpireAction( context ); } case WorkingMemoryAction.WorkingMemoryBehahviourRetract : { return new BehaviorExpireWMAction( context ); } } return null; }
context ); while ( context.readShort() == PersisterEnums.ENTRY_POINT) { String entryPointId = context.stream.readUTF(); WorkingMemoryEntryPoint wmep = context.wm.getEntryPoints().get( entryPointId ); while (context.stream.readShort() == PersisterEnums.LEFT_TUPLE) { LeftTupleSink sink = (LeftTupleSink) context.sinks.get( context.stream.readInt() ); LeftTuple leftTuple = sink.createLeftTuple( handle, short type = context.stream.readShort(); if (PersisterEnums.END != type) { throw new IllegalStateException( "No process marshaller, unable to unmarshall type: " + type ); short type = context.stream.readShort(); if (PersisterEnums.END != type) { throw new IllegalStateException( "No process marshaller, unable to unmarshall type: " + type ); short type = context.stream.readShort(); if (PersisterEnums.END != type) { throw new IllegalStateException( "No process marshaller, unable to unmarshall type: " + type ); while ( context.readShort() == PersisterEnums.DEFAULT_TIMER) { InputMarshaller.readTimer( context );
public static Trigger readTrigger( MarshallerReaderContext inCtx ) throws IOException, ClassNotFoundException { short triggerInt = inCtx.readShort();