public ReteooStatelessSession(final InternalRuleBase ruleBase) { this.ruleBase = ruleBase; this.sessionConf = SessionConfiguration.getDefaultInstance(); // create one of these and re-use }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { ruleBase = (InternalRuleBase) in.readObject(); agendaFilter = (AgendaFilter) in.readObject(); globalResolver = (GlobalResolver) in.readObject(); globalExporter = (GlobalExporter) in.readObject(); this.sessionConf = SessionConfiguration.getDefaultInstance(); // create one of these and re-use }
public StatefulSession newStatefulSession(java.io.InputStream stream, boolean keepReference) { return newStatefulSession( stream, keepReference, SessionConfiguration.getDefaultInstance() ); }
public ReteooStatefulSession(final int id, final InternalRuleBase ruleBase, final ExecutorService executorService) { this( id, ruleBase, executorService, SessionConfiguration.getDefaultInstance(), EnvironmentFactory.newEnvironment() ); }
public ReteooWorkingMemory(final int id, final InternalRuleBase ruleBase) { this( id, ruleBase, true, SessionConfiguration.getDefaultInstance(), EnvironmentFactory.newEnvironment() ); }
/** * @see RuleBase */ public StatefulSession newStatefulSession() { return newStatefulSession( SessionConfiguration.getDefaultInstance(), EnvironmentFactory.newEnvironment() ); }
/** * Create a new session into which to read the stream data * @param context * @param id * @param executor * @return * @throws IOException * @throws ClassNotFoundException */ public static ReteooStatefulSession readSession( MarshallerReaderContext context, int id, ExecutorService executor ) throws IOException, ClassNotFoundException { return readSession( context, id, executor, EnvironmentFactory.newEnvironment(), SessionConfiguration.getDefaultInstance() ); }
/** * Create a new session into which to read the stream data * @param context * @param id * @param executor * @return * @throws IOException * @throws ClassNotFoundException */ public static ReteooStatefulSession readSession(MarshallerReaderContext context, int id, ExecutorService executor) throws IOException, ClassNotFoundException { ReteooStatefulSession session = readSession( context, id, executor, EnvironmentFactory.newEnvironment(), SessionConfiguration.getDefaultInstance() ); return session; }
public StatefulKnowledgeSession newStatefulKnowledgeSession(KnowledgeSessionConfiguration conf, Environment environment) { // NOTE if you update here, you'll also need to update the JPAService if ( conf == null ) { conf = SessionConfiguration.getDefaultInstance(); } if ( environment == null ) { environment = EnvironmentFactory.newEnvironment(); } ReteooStatefulSession session = (ReteooStatefulSession) this.ruleBase.newStatefulSession( (SessionConfiguration) conf, environment ); return (StatefulKnowledgeSession) session.getKnowledgeRuntime(); }
public StatefulSession newStatefulSession(SessionConfiguration sessionConfig, Environment environment) { if ( sessionConfig == null ) { sessionConfig = SessionConfiguration.getDefaultInstance(); } if ( environment == null ) { environment = EnvironmentFactory.newEnvironment(); } return newStatefulSession( nextWorkingMemoryCounter(), sessionConfig, environment ); }
public StatelessKnowledgeSessionImpl(final InternalRuleBase ruleBase, final KnowledgeAgent kagent, final KnowledgeSessionConfiguration conf) { this.ruleBase = ruleBase; this.kagent = kagent; this.conf = (conf != null) ? conf : SessionConfiguration.getDefaultInstance(); this.environment = EnvironmentFactory.newEnvironment(); if ( this.ruleBase != null ) { // FIXME: this same code exists in ReteooRuleBase#newStatelessSession() this.ruleBase.lock(); try { if ( ruleBase.getConfiguration().isSequential() ) { this.ruleBase.getReteooBuilder().order(); } } finally { this.ruleBase.unlock(); } } }