org.drools.reteoo
Class ReteooStatefulSession

java.lang.Object
  extended by org.drools.common.AbstractWorkingMemory
      extended by org.drools.reteoo.ReteooWorkingMemory
          extended by org.drools.reteoo.ReteooStatefulSession
All Implemented Interfaces:
Externalizable, Serializable, EventSupport, InternalWorkingMemory, InternalWorkingMemoryActions, InternalWorkingMemoryEntryPoint, org.drools.event.process.ProcessEventManager, ReteooWorkingMemoryInterface, RuleBaseEventManager, org.drools.runtime.rule.WorkingMemoryEntryPoint, StatefulSession, WorkingMemory, WorkingMemoryEventManager

public class ReteooStatefulSession
extends ReteooWorkingMemory
implements StatefulSession, Externalizable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.drools.reteoo.ReteooWorkingMemory
ReteooWorkingMemory.EvaluateResultConstraints, ReteooWorkingMemory.QueryInsertAction, ReteooWorkingMemory.QueryResultInsertAction, ReteooWorkingMemory.QueryResultRetractAction, ReteooWorkingMemory.QueryResultUpdateAction, ReteooWorkingMemory.QueryRetractAction, ReteooWorkingMemory.QueryRiaFixerNodeFixer, ReteooWorkingMemory.QueryUpdateAction, ReteooWorkingMemory.WorkingMemoryReteAssertAction, ReteooWorkingMemory.WorkingMemoryReteExpireAction
 
Nested classes/interfaces inherited from class org.drools.common.AbstractWorkingMemory
AbstractWorkingMemory.GlobalsAdapter, AbstractWorkingMemory.RuleFlowDeactivateEvent
 
Field Summary
 byte[] bytes
           
 
Fields inherited from class org.drools.common.AbstractWorkingMemory
__ruleBaseEventListeners, agenda, agendaEventSupport, calendars, config, dateFormats, defaultEntryPoint, discardOnLogicalOverride, entryPoints, evaluatingActionQueue, firing, globalResolver, handleFactory, id, initialFactHandle, lock, partitionManager, propagationIdCounter, ruleBase, threadPool, workingMemoryEventSupport
 
Constructor Summary
ReteooStatefulSession()
           
ReteooStatefulSession(int id, InternalRuleBase ruleBase, ExecutorService executorService)
           
ReteooStatefulSession(int id, InternalRuleBase ruleBase, ExecutorService executorService, FactHandleFactory handleFactory, InternalFactHandle initialFactHandle, long propagationContext, SessionConfiguration config, InternalAgenda agenda, org.drools.runtime.Environment environment)
           
ReteooStatefulSession(int id, InternalRuleBase ruleBase, ExecutorService executorService, SessionConfiguration config, org.drools.runtime.Environment environment)
           
 
Method Summary
 Future asyncFireAllRules()
          This will initiate the firing phase (in the background).
 Future asyncFireAllRules(AgendaFilter agendaFilter)
          This will initiate the firing phase (in the background).
 Future asyncInsert(Collection collection)
          Insert/Assert a collect of objects..
 Future asyncInsert(Iterable<?> iterable)
           
 Future asyncInsert(Object object)
          Insert/Assert an object asynchronously.
 Future asyncInsert(Object[] array)
          Insert/Assert an array of objects..
 Future asyncRetract(FactHandle factHandle)
           
 Future asyncUpdate(FactHandle factHandle, Object object)
           
 void dispose()
          Internal method called by the engine when the session is being disposed, so that the entry point can proceed with the necessary clean ups.
 ExecutorService getExecutorService()
           
 List getRuleBaseUpdateListeners()
           
 void readExternal(ObjectInput in)
           
 void setExecutorService(ExecutorService executor)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.drools.reteoo.ReteooWorkingMemory
closeLiveQuery, getEntryPoint, getFactHandles, getFactHandles, getInternalWorkingMemory, getObjects, getObjects, getQueryResults, getQueryResults, openLiveQuery
 
Methods inherited from class org.drools.common.AbstractWorkingMemory
activationFired, addEventListener, addEventListener, addEventListener, addEventListener, addLIANodePropagation, clearActivationGroup, clearAgenda, clearAgendaGroup, clearNodeMemory, clearRuleFlowGroup, createProcessInstance, endBatchExecution, endOperation, executeQueuedActions, fireAllRules, fireAllRules, fireAllRules, fireAllRules, fireUntilHalt, fireUntilHalt, getActionQueue, getActivationParameters, getActivationParameters, getAgenda, getAgendaEventListeners, getAgendaEventSupport, getCalendars, getChannels, getDateFormats, getEntryPointId, getEntryPointNode, getEntryPoints, getEnvironment, getExecutionResult, getExitPoints, getFactCount, getFactHandle, getFactHandleByIdentity, getFactHandleFactory, getGlobal, getGlobalResolver, getId, getIdleTime, getInitialFactHandle, getKnowledgeRuntime, getLastIdleTimestamp, getLock, getNextPropagationIdCounter, getNodeMemories, getNodeMemory, getObject, getObjectMarshallingStrategyStore, getObjectStore, getObjectTypeConfigurationRegistry, getPartitionTaskManager, getProcessEventListeners, getProcessInstance, getProcessInstances, getProcessRuntime, getPropagationIdCounter, getRuleBase, getRuleBaseEventListeners, getSessionClock, getSessionConfiguration, getTimerService, getTimeToNextJob, getTotalFactCount, getTruthMaintenanceSystem, getWorkingMemoryEntryPoint, getWorkingMemoryEntryPoints, getWorkingMemoryEventListeners, getWorkingMemoryEventSupport, getWorkItemManager, halt, insert, insert, insert, insert, insertLogical, insertLogical, isPartitionManagersActive, isSequential, iterateFactHandles, iterateFactHandles, iterateNonDefaultEntryPointObjectsToList, iterateObjects, iterateObjects, iterateObjectsToList, prepareToFireActivation, queueWorkingMemoryAction, registerChannel, registerExitPoint, removeEventListener, removeEventListener, removeEventListener, removeEventListener, reset, reset, retract, retract, setAgendaEventSupport, setAsyncExceptionHandler, setEndOperationListener, setFocus, setGlobal, setGlobalResolver, setId, setInitialFactHandle, setKnowledgeRuntime, setWorkingMemoryEventSupport, startBatchExecution, startOperation, startPartitionManagers, startProcess, startProcess, startProcessInstance, stopPartitionManagers, unregisterChannel, unregisterExitPoint, update, update, update, updateEntryPointsCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.drools.StatefulSession
fireUntilHalt, fireUntilHalt
 
Methods inherited from interface org.drools.WorkingMemory
clearActivationGroup, clearAgenda, clearAgendaGroup, clearRuleFlowGroup, fireAllRules, fireAllRules, fireAllRules, fireAllRules, getAgenda, getEnvironment, getFactHandle, getFactHandleByIdentity, getGlobal, getGlobalResolver, getObject, getProcessInstance, getProcessInstances, getQueryResults, getRuleBase, getSessionClock, getWorkingMemoryEntryPoint, getWorkItemManager, halt, iterateFactHandles, iterateFactHandles, iterateObjects, iterateObjects, setAsyncExceptionHandler, setFocus, setGlobal, setGlobalResolver, startProcess, startProcess
 
Methods inherited from interface org.drools.WorkingMemoryEventManager
addEventListener, addEventListener, getAgendaEventListeners, getWorkingMemoryEventListeners, removeEventListener, removeEventListener
 
Methods inherited from interface org.drools.RuleBaseEventManager
addEventListener, getRuleBaseEventListeners, removeEventListener
 
Methods inherited from interface org.drools.WorkingMemoryEntryPoint
insert, insert, retract, update
 
Methods inherited from interface org.drools.runtime.rule.WorkingMemoryEntryPoint
getEntryPointId, getFactCount, getFactHandles, getFactHandles, getObjects, getObjects
 
Methods inherited from interface org.drools.reteoo.ReteooWorkingMemoryInterface
createProcessInstance, fireUntilHalt, fireUntilHalt, getActionQueue, getLastIdleTimestamp, getWorkingMemoryEntryPoints, registerChannel, registerExitPoint, setEndOperationListener, startProcessInstance, unregisterChannel, unregisterExitPoint
 
Methods inherited from interface org.drools.common.InternalWorkingMemoryActions
insert, insertLogical, retract, update
 
Methods inherited from interface org.drools.common.InternalWorkingMemory
activationFired, addLIANodePropagation, clearNodeMemory, endBatchExecution, endOperation, executeQueuedActions, getCalendars, getChannels, getDateFormats, getEntryPointNode, getEntryPoints, getExecutionResult, getExitPoints, getFactHandleByIdentity, getFactHandleFactory, getId, getIdleTime, getInitialFactHandle, getKnowledgeRuntime, getLock, getNextPropagationIdCounter, getNodeMemories, getNodeMemory, getObjectStore, getObjectTypeConfigurationRegistry, getPartitionTaskManager, getProcessRuntime, getSessionConfiguration, getTimerService, getTimeToNextJob, getTotalFactCount, getTruthMaintenanceSystem, insert, isSequential, prepareToFireActivation, queueWorkingMemoryAction, setAgendaEventSupport, setId, setKnowledgeRuntime, setWorkingMemoryEventSupport, startBatchExecution, startOperation, updateEntryPointsCache
 
Methods inherited from interface org.drools.common.InternalWorkingMemoryEntryPoint
getEntryPointNode, getFactHandleByIdentity, getObjectStore, getObjectTypeConfigurationRegistry, getRuleBase, reset, update
 
Methods inherited from interface org.drools.common.EventSupport
getAgendaEventListeners, getAgendaEventSupport, getWorkingMemoryEventListeners, getWorkingMemoryEventSupport
 
Methods inherited from interface org.drools.event.process.ProcessEventManager
addEventListener, getProcessEventListeners, removeEventListener
 

Field Detail

bytes

public byte[] bytes
Constructor Detail

ReteooStatefulSession

public ReteooStatefulSession()

ReteooStatefulSession

public ReteooStatefulSession(int id,
                             InternalRuleBase ruleBase,
                             ExecutorService executorService)

ReteooStatefulSession

public ReteooStatefulSession(int id,
                             InternalRuleBase ruleBase,
                             ExecutorService executorService,
                             SessionConfiguration config,
                             org.drools.runtime.Environment environment)

ReteooStatefulSession

public ReteooStatefulSession(int id,
                             InternalRuleBase ruleBase,
                             ExecutorService executorService,
                             FactHandleFactory handleFactory,
                             InternalFactHandle initialFactHandle,
                             long propagationContext,
                             SessionConfiguration config,
                             InternalAgenda agenda,
                             org.drools.runtime.Environment environment)
Method Detail

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

asyncInsert

public Future asyncInsert(Object object)
Description copied from interface: StatefulSession
Insert/Assert an object asynchronously. (return immediately, even while the insertion is taking effect). The returned Future object can be queried to check on the status of the task. You should only use the async methods if you are sure you require a background insertion task to take effect (a new thread may be created). If you are not sure, then you probably don't need to use it !

Specified by:
asyncInsert in interface StatefulSession

asyncRetract

public Future asyncRetract(FactHandle factHandle)
Specified by:
asyncRetract in interface StatefulSession

asyncUpdate

public Future asyncUpdate(FactHandle factHandle,
                          Object object)
Specified by:
asyncUpdate in interface StatefulSession

asyncInsert

public Future asyncInsert(Object[] array)
Description copied from interface: StatefulSession
Insert/Assert an array of objects.. (return immediately, even while the insertion is taking effect). The returned Future object can be queried to check on the status of the task. You should only use the async methods if you are sure you require a background insertion task to take effect (a new thread may be created). If you are not sure, then you probably don't need to use it !

Specified by:
asyncInsert in interface StatefulSession

asyncInsert

public Future asyncInsert(Collection collection)
Description copied from interface: StatefulSession
Insert/Assert a collect of objects.. (return immediately, even while the insertion is taking effect). The returned Future object can be queried to check on the status of the task. You should only use the async methods if you are sure you require a background insertion task to take effect (a new thread may be created). If you are not sure, then you probably don't need to use it !

Specified by:
asyncInsert in interface StatefulSession

asyncInsert

public Future asyncInsert(Iterable<?> iterable)

asyncFireAllRules

public Future asyncFireAllRules(AgendaFilter agendaFilter)
Description copied from interface: StatefulSession
This will initiate the firing phase (in the background). And return immediately. The returned Future object can be queried to check on the status of the task.

Specified by:
asyncFireAllRules in interface StatefulSession

asyncFireAllRules

public Future asyncFireAllRules()
Description copied from interface: StatefulSession
This will initiate the firing phase (in the background). And return immediately. The returned Future object can be queried to check on the status of the task.

Specified by:
asyncFireAllRules in interface StatefulSession

dispose

public void dispose()
Description copied from interface: WorkingMemoryEntryPoint
Internal method called by the engine when the session is being disposed, so that the entry point can proceed with the necessary clean ups.

Specified by:
dispose in interface StatefulSession
Overrides:
dispose in class AbstractWorkingMemory

getRuleBaseUpdateListeners

public List getRuleBaseUpdateListeners()
Specified by:
getRuleBaseUpdateListeners in interface StatefulSession

getExecutorService

public ExecutorService getExecutorService()

setExecutorService

public void setExecutorService(ExecutorService executor)


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.