public ReteooWorkingMemory(final int id, final InternalRuleBase ruleBase, final SessionConfiguration config, final Environment environment, final WorkingMemoryEventSupport workingMemoryEventSupport, final AgendaEventSupport agendaEventSupport) { super( id, ruleBase, ruleBase.newFactHandleFactory(), config, environment, workingMemoryEventSupport, agendaEventSupport ); }
/** * Construct. * * @param ruleBase * The backing rule-base. */ public ReteooWorkingMemory(final int id, final InternalRuleBase ruleBase, final boolean initInitialFactHandle, final SessionConfiguration config, final Environment environment) { super( id, ruleBase, initInitialFactHandle, ruleBase.newFactHandleFactory(), config, environment ); }
private static ReteooStatefulSession createAndInitializeSession(MarshallerReaderContext context, int id, ExecutorService executor, Environment environment, SessionConfiguration config, ProtobufMessages.KnowledgeSession _session) throws IOException { FactHandleFactory handleFactory = context.ruleBase.newFactHandleFactory( _session.getRuleData().getLastId(), _session.getRuleData().getLastRecency() ); DefaultAgenda agenda = context.ruleBase.getConfiguration().getComponentFactory().getAgendaFactory().createAgenda( context.ruleBase, false ); readAgenda( context, _session.getRuleData(), agenda ); ReteooStatefulSession session = new ReteooStatefulSession( id, context.ruleBase, executor, handleFactory, false, 1, config, agenda, environment ); new StatefulKnowledgeSessionImpl( session ); return session; }
FactHandleFactory handleFactory = context.ruleBase.newFactHandleFactory( context.readInt(), context.readLong() );