Package org.drools.kiesession.session
Class StatefulKnowledgeSessionImpl
java.lang.Object
org.drools.core.impl.AbstractRuntime
org.drools.kiesession.session.StatefulKnowledgeSessionImpl
- All Implemented Interfaces:
Externalizable,Serializable,AutoCloseable,org.drools.base.base.ValueResolver,EventSupport,InternalKnowledgeRuntime,InternalWorkingMemory,InternalWorkingMemoryActions,ReteEvaluator,WorkingMemory,WorkingMemoryEntryPoint,WorkingMemoryEventManager,KieBaseEventManager,KieRuntimeEventManager,ProcessEventManager,RuleRuntimeEventManager,CommandExecutor,KieRuntime,KieSession,ProcessRuntime,StatefulProcessSession,EntryPoint,RuleRuntime,StatefulRuleSession,RuleEventManager,CorrelationAwareProcessRuntime,StatefulKnowledgeSession
public class StatefulKnowledgeSessionImpl
extends AbstractRuntime
implements StatefulKnowledgeSession, WorkingMemoryEntryPoint, InternalKnowledgeRuntime, KieSession, KieRuntimeEventManager, InternalWorkingMemoryActions, EventSupport, RuleEventManager, ProcessEventManager, CorrelationAwareProcessRuntime, Externalizable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface org.kie.api.runtime.KieSession
KieSession.AtomicActionNested classes/interfaces inherited from interface org.drools.core.common.ReteEvaluator
ReteEvaluator.InternalOperationType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InternalAgendaRule-firing agenda.protected AgendaEventSupportbyte[]protected Calendarsprotected KieSessionConfigurationstatic final Stringstatic final Stringprotected org.drools.base.rule.accessor.GlobalResolverGlobal values which are associated with this memory.protected FactHandleFactoryprotected Longprotected InternalFactHandleprotected InternalKnowledgeBaseTheRuleBasewith which this memory is associated.protected List<KieBaseEventListener>protected ReentrantLockprotected RuleEventListenerSupportprotected RuleRuntimeEventSupportThe eventSupportprotected RuleSessionConfigurationFields inherited from class org.drools.core.impl.AbstractRuntime
logger -
Constructor Summary
ConstructorsConstructorDescriptionStatefulKnowledgeSessionImpl(long id, InternalKnowledgeBase kBase) StatefulKnowledgeSessionImpl(long id, InternalKnowledgeBase kBase, boolean initInitFactHandle, SessionConfiguration config, Environment environment) StatefulKnowledgeSessionImpl(long id, InternalKnowledgeBase kBase, FactHandleFactory handleFactory, long propagationContext, SessionConfiguration config, Environment environment) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidactivate()voidaddEventListener(KieBaseEventListener listener) voidaddEventListener(ProcessEventListener listener) voidaddEventListener(AgendaEventListener listener) voidaddEventListener(RuleRuntimeEventListener listener) voidaddEventListener(RuleEventListener listener) voidaddPropagation(PropagationEntry propagationEntry) voidcancelActivation(InternalMatch internalMatch, boolean declarativeAgenda) protected voidvoidclearActivationGroup(String group) voidvoidclearAgendaGroup(String group) voidclearNodeMemory(MemoryFactory node) voidclearRuleFlowGroup(String group) voidcloseLiveQuery(InternalFactHandle factHandle) createProcessInstance(String processId, Map<String, Object> parameters) createProcessInstance(String processId, CorrelationKey correlationKey, Map<String, Object> parameters) <T> TcreateRuntimeService(Class<T> cls) protected TimerServicevoidvoiddelete(FactHandle handle) voiddelete(FactHandle factHandle, org.drools.base.definitions.rule.impl.RuleImpl rule, TerminalNode terminalNode) voiddelete(FactHandle factHandle, org.drools.base.definitions.rule.impl.RuleImpl rule, TerminalNode terminalNode, FactHandle.State fhState) voiddelete(FactHandle handle, FactHandle.State fhState) voiddestroy()voiddispose()<T,K> T don(InternalMatch internalMatch, K core, Class<T> trait, boolean b, org.drools.base.beliefsystem.Mode[] modes) <T,K> T don(InternalMatch internalMatch, K core, Collection<Class<? extends org.drools.base.factmodel.traits.Thing>> traits, boolean b, org.drools.base.beliefsystem.Mode[] modes) voidvoidvoidendOperation(ReteEvaluator.InternalOperationType operationType) This method must be called after finishing any work in the engine, like inserting a new fact or firing a new rule.<T> TintintfireAllRules(int fireLimit) intfireAllRules(AgendaFilter agendaFilter) intfireAllRules(AgendaFilter agendaFilter, int fireLimit) voidKeeps firing activations until a halt is called.voidfireUntilHalt(AgendaFilter agendaFilter) Keeps firing activations until a halt is called.voidIterator<? extends PropagationEntry>longorg.drools.base.rule.EntryPointIdgetEntryPoint(String name) Collection<? extends EntryPoint>longgetFactHandle(Object object) <T extends FactHandle>
Collection<T><T extends FactHandle>
Collection<T>getFactHandles(ObjectFilter filter) org.drools.base.rule.accessor.GlobalResolverintgetId()longlongReturns the number of time units (usually ms) that the engine is idle according to the session clock or -1 if it is not idle.<T> TgetKieRuntime(Class<T> cls) longgetLock()long<T extends Memory>
TgetNodeMemory(MemoryFactory<T> node) Retrieve theJoinMemoryfor a particularJoinNode.getObject(FactHandle handle) Returns the fact Object for the givenFactHandle.Collection<?>Collection<?>getObjects(ObjectFilter filter) getProcessInstance(String processInstanceId) getProcessInstance(String processInstanceId, boolean readOnly) getProcessInstance(CorrelationKey correlationKey) getQueryResults(String queryName, Object... arguments) getQueryResultsFromRHS(String queryName, Object... arguments) (This shall NOT be exposed on public API)org.drools.base.RuleBaselongReturns the number of time units (usually ms) to the next scheduled joblongvoidhalt()initInitialFact(MarshallerReaderContext context) voidinitMBeans(String containerId, String kbaseName, String ksessionName) insert(Object object, boolean dynamic, org.drools.base.definitions.rule.impl.RuleImpl rule, TerminalNode terminalNode) insertAsync(Object object) protected QueryResultsImplinternalGetQueryResult(boolean calledFromRHS, String queryName, Object... arguments) booleanisAlive()booleanbooleanThis class is not thread safe, changes to the working memory during iteration may give unexpected resultsiterateFactHandles(ObjectFilter filter) This class is not thread safe, changes to the working memory during iteration may give unexpected resultsThis class is not thread safe, changes to the working memory during iteration may give unexpected resultsiterateObjects(ObjectFilter filter) This class is not thread safe, changes to the working memory during iteration may give unexpected resultsvoidopenLiveQuery(String query, Object[] arguments, ViewChangedEventListener listener) voidvoidregisterChannel(String name, Channel channel) voidremoveEventListener(KieBaseEventListener listener) voidremoveEventListener(ProcessEventListener listener) voidremoveEventListener(AgendaEventListener listener) voidremoveEventListener(RuleRuntimeEventListener listener) voidremoveEventListener(RuleEventListener listener) voidremoveGlobal(String identifier) voidreset()voidreset(long handleId, long handleCounter, long propagationCounter) voidretract(FactHandle handle) voidsetAgendaEventSupport(AgendaEventSupport agendaEventSupport) voidsetEndOperationListener(EndOperationListener listener) voidvoidvoidsetGlobalResolver(org.drools.base.rule.accessor.GlobalResolver globalResolver) voidsetHandleFactory(FactHandleFactory handleFactory) voidsetIdentifier(long id) voidsetInitialFactHandle(InternalFactHandle initialFactHandle) voidsetRuleEventListenerSupport(RuleEventListenerSupport ruleEventListenerSupport) voidsetRuleRuntimeEventSupport(RuleRuntimeEventSupport ruleRuntimeEventSupport) setStateless(boolean stateless) voidsetWorkingMemoryActionListener(Consumer<PropagationEntry> workingMemoryActionListener) <T,K, X extends org.drools.base.factmodel.traits.TraitableBean>
org.drools.base.factmodel.traits.Thing<K>shed(InternalMatch internalMatch, org.drools.base.factmodel.traits.TraitableBean<K, X> core, Class<T> trait) voidsignalEvent(String type, Object event) voidsignalEvent(String type, Object event, String processInstanceId) voidvoidstartOperation(ReteEvaluator.InternalOperationType operationType) This method must be called before starting any new work in the engine, like inserting a new fact or firing a new rule.startProcess(String processId) startProcess(String processId, Map<String, Object> parameters) startProcess(String processId, Map<String, Object> parameters, AgendaFilter agendaFilter) startProcess(String processId, AgendaFilter agendaFilter) startProcess(String processId, CorrelationKey correlationKey, Map<String, Object> parameters) startProcessFromNodeIds(String processId, CorrelationKey key, Map<String, Object> params, String... nodeIds) startProcessInstance(String processInstanceId) voidsubmit(KieSession.AtomicAction action) toString()booleanvoidunregisterChannel(String name) voidupdate(FactHandle factHandle) voidupdate(FactHandle handle, Object object) voidupdate(FactHandle handle, Object object, String... modifiedProperties) voidupdate(FactHandle factHandle, Object object, org.drools.util.bitmask.BitMask mask, Class<?> modifiedClass, InternalMatch internalMatch) modify is implemented as half way retract / assert due to the truth maintenance issues.voidvoidupdateTraits(InternalFactHandle h, org.drools.util.bitmask.BitMask mask, Class<?> modifiedClass, InternalMatch internalMatch) voidMethods inherited from class org.drools.core.impl.AbstractRuntime
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kie.api.runtime.rule.EntryPoint
getInstancesOf, getSingleInstanceOfMethods inherited from interface org.drools.core.common.InternalWorkingMemory
isThreadSafeMethods inherited from interface org.kie.api.event.KieRuntimeEventManager
getLoggerMethods inherited from interface org.kie.api.runtime.KieSession
closeMethods inherited from interface org.drools.core.common.ReteEvaluator
createFactHandle, createKnowledgeHelper, getDefaultEntryPoint, getDefaultEntryPointId, getTimerJobInstances, onWorkingMemoryActionMethods inherited from interface org.drools.core.WorkingMemoryEntryPoint
getRuleUnit, setRuleUnit
-
Field Details
-
ERRORMSG
- See Also:
-
DEFAULT_RULE_UNIT
- See Also:
-
bytes
public byte[] bytes -
id
-
globalResolver
protected org.drools.base.rule.accessor.GlobalResolver globalResolverGlobal values which are associated with this memory. -
calendars
-
ruleRuntimeEventSupport
The eventSupport -
ruleEventListenerSupport
-
agendaEventSupport
-
kieBaseEventListeners
-
kBase
TheRuleBasewith which this memory is associated. -
handleFactory
-
agenda
Rule-firing agenda. -
lock
-
initialFactHandle
-
config
-
ruleSessionConfig
-
DUMMY_PROCESS_RUNTIME
-
-
Constructor Details
-
StatefulKnowledgeSessionImpl
public StatefulKnowledgeSessionImpl() -
StatefulKnowledgeSessionImpl
-
StatefulKnowledgeSessionImpl
public StatefulKnowledgeSessionImpl(long id, InternalKnowledgeBase kBase, boolean initInitFactHandle, SessionConfiguration config, Environment environment) -
StatefulKnowledgeSessionImpl
public StatefulKnowledgeSessionImpl(long id, InternalKnowledgeBase kBase, FactHandleFactory handleFactory, long propagationContext, SessionConfiguration config, Environment environment)
-
-
Method Details
-
setStateless
-
initMBeans
-
getHandleFactory
- Specified by:
getHandleFactoryin interfaceWorkingMemoryEntryPoint
-
setHandleFactory
-
getKieRuntime
- Specified by:
getKieRuntimein interfaceKieSession
-
createRuntimeService
-
getEntryPoint
- Specified by:
getEntryPointin interfaceReteEvaluator- Specified by:
getEntryPointin interfaceRuleRuntime
-
getEntryPoints
- Specified by:
getEntryPointsin interfaceInternalWorkingMemory- Specified by:
getEntryPointsin interfaceReteEvaluator- Specified by:
getEntryPointsin interfaceRuleRuntime
-
getRuleRuntimeEventListeners
- Specified by:
getRuleRuntimeEventListenersin interfaceEventSupport- Specified by:
getRuleRuntimeEventListenersin interfaceRuleRuntimeEventManager- Specified by:
getRuleRuntimeEventListenersin interfaceWorkingMemoryEventManager
-
getAgendaEventListeners
- Specified by:
getAgendaEventListenersin interfaceEventSupport- Specified by:
getAgendaEventListenersin interfaceRuleRuntimeEventManager- Specified by:
getAgendaEventListenersin interfaceWorkingMemoryEventManager
-
getProcessRuntime
- Specified by:
getProcessRuntimein interfaceInternalKnowledgeRuntime- Specified by:
getProcessRuntimein interfaceInternalWorkingMemory
-
internalGetProcessRuntime
- Specified by:
internalGetProcessRuntimein interfaceInternalWorkingMemory
-
addEventListener
- Specified by:
addEventListenerin interfaceProcessEventManager
-
getProcessEventListeners
- Specified by:
getProcessEventListenersin interfaceProcessEventManager
-
removeEventListener
- Specified by:
removeEventListenerin interfaceProcessEventManager
-
getKieBase
- Specified by:
getKieBasein interfaceKieRuntime
-
getWorkingMemoryActionListener
- Specified by:
getWorkingMemoryActionListenerin interfaceReteEvaluator
-
setWorkingMemoryActionListener
- Specified by:
setWorkingMemoryActionListenerin interfaceReteEvaluator
-
dispose
public void dispose()- Specified by:
disposein interfaceKieSession- Specified by:
disposein interfaceReteEvaluator- Specified by:
disposein interfaceWorkingMemoryEntryPoint
-
isAlive
public boolean isAlive() -
destroy
public void destroy()- Specified by:
destroyin interfaceKieSession
-
update
-
abortProcessInstance
- Specified by:
abortProcessInstancein interfaceProcessRuntime
-
signalEvent
- Specified by:
signalEventin interfaceProcessRuntime
-
signalEvent
- Specified by:
signalEventin interfaceProcessRuntime
-
getGlobals
- Specified by:
getGlobalsin interfaceKieRuntime
-
getFactHandles
- Specified by:
getFactHandlesin interfaceEntryPoint
-
getFactHandles
- Specified by:
getFactHandlesin interfaceEntryPoint
-
getObjects
- Specified by:
getObjectsin interfaceEntryPoint
-
getObjects
- Specified by:
getObjectsin interfaceEntryPoint
-
execute
- Specified by:
executein interfaceCommandExecutor
-
initInitialFact
-
getEntryPointId
- Specified by:
getEntryPointIdin interfaceEntryPoint
-
getQueryResultsFromRHS
(This shall NOT be exposed on public API) -
getQueryResults
- Specified by:
getQueryResultsin interfaceReteEvaluator- Specified by:
getQueryResultsin interfaceRuleRuntime- Specified by:
getQueryResultsin interfaceWorkingMemory
-
internalGetQueryResult
protected QueryResultsImpl internalGetQueryResult(boolean calledFromRHS, String queryName, Object... arguments) -
openLiveQuery
- Specified by:
openLiveQueryin interfaceRuleRuntime
-
closeLiveQuery
- Specified by:
closeLiveQueryin interfaceInternalWorkingMemory
-
getEntryPoint
public org.drools.base.rule.EntryPointId getEntryPoint()- Specified by:
getEntryPointin interfaceWorkingMemoryEntryPoint
-
getReteEvaluator
- Specified by:
getReteEvaluatorin interfaceWorkingMemoryEntryPoint
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
updateEntryPointsCache
public void updateEntryPointsCache()- Specified by:
updateEntryPointsCachein interfaceInternalWorkingMemory
-
getRuleSessionConfiguration
- Specified by:
getRuleSessionConfigurationin interfaceReteEvaluator
-
getSessionConfiguration
- Specified by:
getSessionConfigurationin interfaceKieRuntime- Specified by:
getSessionConfigurationin interfaceReteEvaluator
-
reset
public void reset()- Specified by:
resetin interfaceWorkingMemoryEntryPoint
-
reset
public void reset(long handleId, long handleCounter, long propagationCounter) -
setRuleRuntimeEventSupport
- Specified by:
setRuleRuntimeEventSupportin interfaceInternalWorkingMemory
-
setAgendaEventSupport
- Specified by:
setAgendaEventSupportin interfaceInternalWorkingMemory
-
isSequential
public boolean isSequential()- Specified by:
isSequentialin interfaceReteEvaluator
-
addEventListener
- Specified by:
addEventListenerin interfaceRuleRuntimeEventManager- Specified by:
addEventListenerin interfaceWorkingMemoryEventManager
-
removeEventListener
- Specified by:
removeEventListenerin interfaceRuleRuntimeEventManager- Specified by:
removeEventListenerin interfaceWorkingMemoryEventManager
-
addEventListener
- Specified by:
addEventListenerin interfaceRuleRuntimeEventManager- Specified by:
addEventListenerin interfaceWorkingMemoryEventManager
-
removeEventListener
- Specified by:
removeEventListenerin interfaceRuleRuntimeEventManager- Specified by:
removeEventListenerin interfaceWorkingMemoryEventManager
-
addEventListener
- Specified by:
addEventListenerin interfaceKieBaseEventManager
-
getKieBaseEventListeners
- Specified by:
getKieBaseEventListenersin interfaceKieBaseEventManager
-
removeEventListener
- Specified by:
removeEventListenerin interfaceKieBaseEventManager
-
getRuleEventSupport
- Specified by:
getRuleEventSupportin interfaceEventSupport- Specified by:
getRuleEventSupportin interfaceReteEvaluator
-
setRuleEventListenerSupport
-
addEventListener
- Specified by:
addEventListenerin interfaceRuleEventManager
-
removeEventListener
- Specified by:
removeEventListenerin interfaceRuleEventManager
-
getFactHandleFactory
- Specified by:
getFactHandleFactoryin interfaceReteEvaluator
-
setGlobal
- Specified by:
setGlobalin interfaceKieRuntime- Specified by:
setGlobalin interfaceReteEvaluator- Specified by:
setGlobalin interfaceWorkingMemory
-
removeGlobal
- Specified by:
removeGlobalin interfaceInternalWorkingMemory
-
setGlobalResolver
public void setGlobalResolver(org.drools.base.rule.accessor.GlobalResolver globalResolver) - Specified by:
setGlobalResolverin interfaceWorkingMemory
-
getGlobalResolver
public org.drools.base.rule.accessor.GlobalResolver getGlobalResolver()- Specified by:
getGlobalResolverin interfaceorg.drools.base.base.ValueResolver
-
getCalendars
- Specified by:
getCalendarsin interfaceKieRuntime- Specified by:
getCalendarsin interfaceReteEvaluator
-
getId
public int getId()- Specified by:
getIdin interfaceKieSession
-
getIdentifier
public long getIdentifier()- Specified by:
getIdentifierin interfaceInternalWorkingMemory- Specified by:
getIdentifierin interfaceKieSession- Specified by:
getIdentifierin interfaceReteEvaluator
-
setIdentifier
public void setIdentifier(long id) - Specified by:
setIdentifierin interfaceInternalKnowledgeRuntime- Specified by:
setIdentifierin interfaceInternalWorkingMemory
-
checkAlive
protected void checkAlive() -
getGlobal
- Specified by:
getGlobalin interfaceKieRuntime- Specified by:
getGlobalin interfaceReteEvaluator- Specified by:
getGlobalin interfaceorg.drools.base.base.ValueResolver
-
getEnvironment
- Specified by:
getEnvironmentin interfaceKieRuntime- Specified by:
getEnvironmentin interfaceWorkingMemory
-
getAgenda
- Specified by:
getAgendain interfaceInternalWorkingMemory- Specified by:
getAgendain interfaceRuleRuntime- Specified by:
getAgendain interfaceWorkingMemory
-
clearAgenda
public void clearAgenda()- Specified by:
clearAgendain interfaceWorkingMemory
-
clearAgendaGroup
- Specified by:
clearAgendaGroupin interfaceWorkingMemory
-
clearActivationGroup
- Specified by:
clearActivationGroupin interfaceWorkingMemory
-
clearRuleFlowGroup
- Specified by:
clearRuleFlowGroupin interfaceWorkingMemory
-
getActivationsManager
- Specified by:
getActivationsManagerin interfaceReteEvaluator
-
getKnowledgeBase
- Specified by:
getKnowledgeBasein interfaceReteEvaluator- Specified by:
getKnowledgeBasein interfaceWorkingMemoryEntryPoint
-
halt
public void halt()- Specified by:
haltin interfaceRuleRuntime- Specified by:
haltin interfaceWorkingMemory
-
fireAllRules
public int fireAllRules()- Specified by:
fireAllRulesin interfaceReteEvaluator- Specified by:
fireAllRulesin interfaceStatefulRuleSession- Specified by:
fireAllRulesin interfaceWorkingMemory
-
fireAllRules
public int fireAllRules(int fireLimit) - Specified by:
fireAllRulesin interfaceReteEvaluator- Specified by:
fireAllRulesin interfaceStatefulRuleSession- Specified by:
fireAllRulesin interfaceWorkingMemory
-
fireAllRules
- Specified by:
fireAllRulesin interfaceReteEvaluator- Specified by:
fireAllRulesin interfaceStatefulRuleSession- Specified by:
fireAllRulesin interfaceWorkingMemory
-
fireAllRules
- Specified by:
fireAllRulesin interfaceReteEvaluator- Specified by:
fireAllRulesin interfaceStatefulRuleSession- Specified by:
fireAllRulesin interfaceWorkingMemory
-
fireUntilHalt
public void fireUntilHalt()Keeps firing activations until a halt is called. If in a given moment, there is no activation to fire, it will wait for an activation to be added to an active agenda group or rule flow group.- Specified by:
fireUntilHaltin interfaceStatefulRuleSession- Throws:
IllegalStateException- if this method is called when running in sequential mode
-
fireUntilHalt
Keeps firing activations until a halt is called. If in a given moment, there is no activation to fire, it will wait for an activation to be added to an active agenda group or rule flow group.- Specified by:
fireUntilHaltin interfaceStatefulRuleSession- Parameters:
agendaFilter- filters the activations that may fire- Throws:
IllegalStateException- if this method is called when running in sequential mode
-
getObject
Returns the fact Object for the givenFactHandle. It actually attempts to return the value from the handle, before retrieving it from objects map.- Specified by:
getObjectin interfaceEntryPoint- Parameters:
handle- TheFactHandlereference for theObjectlookup- See Also:
-
getObjectStore
- Specified by:
getObjectStorein interfaceWorkingMemoryEntryPoint
-
getFactHandle
- Specified by:
getFactHandlein interfaceEntryPoint- Specified by:
getFactHandlein interfaceReteEvaluator- See Also:
-
iterateObjects
This class is not thread safe, changes to the working memory during iteration may give unexpected results- Specified by:
iterateObjectsin interfaceWorkingMemory
-
iterateObjects
This class is not thread safe, changes to the working memory during iteration may give unexpected results- Specified by:
iterateObjectsin interfaceWorkingMemory
-
iterateFactHandles
This class is not thread safe, changes to the working memory during iteration may give unexpected results- Specified by:
iterateFactHandlesin interfaceWorkingMemory
-
iterateFactHandles
This class is not thread safe, changes to the working memory during iteration may give unexpected results- Specified by:
iterateFactHandlesin interfaceWorkingMemory
-
setFocus
- Specified by:
setFocusin interfaceWorkingMemory
-
insertAsync
- Specified by:
insertAsyncin interfaceInternalWorkingMemoryActions
-
enableTMS
public void enableTMS()- Specified by:
enableTMSin interfaceReteEvaluator
-
isTMSEnabled
public boolean isTMSEnabled()- Specified by:
isTMSEnabledin interfaceReteEvaluator
-
insert
- Specified by:
insertin interfaceEntryPoint- Specified by:
insertin interfaceReteEvaluator- See Also:
-
insert
- Specified by:
insertin interfaceWorkingMemoryEntryPoint
-
submit
- Specified by:
submitin interfaceKieSession
-
updateTraits
public void updateTraits(InternalFactHandle h, org.drools.util.bitmask.BitMask mask, Class<?> modifiedClass, InternalMatch internalMatch) - Specified by:
updateTraitsin interfaceInternalWorkingMemoryActions
-
shed
public <T,K, org.drools.base.factmodel.traits.Thing<K> shedX extends org.drools.base.factmodel.traits.TraitableBean> (InternalMatch internalMatch, org.drools.base.factmodel.traits.TraitableBean<K, X> core, Class<T> trait) - Specified by:
shedin interfaceInternalWorkingMemoryActions
-
don
public <T,K> T don(InternalMatch internalMatch, K core, Collection<Class<? extends org.drools.base.factmodel.traits.Thing>> traits, boolean b, org.drools.base.beliefsystem.Mode[] modes) - Specified by:
donin interfaceInternalWorkingMemoryActions
-
don
public <T,K> T don(InternalMatch internalMatch, K core, Class<T> trait, boolean b, org.drools.base.beliefsystem.Mode[] modes) - Specified by:
donin interfaceInternalWorkingMemoryActions
-
insert
public FactHandle insert(Object object, boolean dynamic, org.drools.base.definitions.rule.impl.RuleImpl rule, TerminalNode terminalNode) - Specified by:
insertin interfaceInternalWorkingMemoryActions
-
retract
- Specified by:
retractin interfaceEntryPoint
-
delete
- Specified by:
deletein interfaceEntryPoint
-
delete
- Specified by:
deletein interfaceEntryPoint
-
delete
public void delete(FactHandle factHandle, org.drools.base.definitions.rule.impl.RuleImpl rule, TerminalNode terminalNode) - Specified by:
deletein interfaceWorkingMemoryEntryPoint
-
delete
public void delete(FactHandle factHandle, org.drools.base.definitions.rule.impl.RuleImpl rule, TerminalNode terminalNode, FactHandle.State fhState) - Specified by:
deletein interfaceWorkingMemoryEntryPoint
-
getEntryPointNode
- Specified by:
getEntryPointNodein interfaceWorkingMemoryEntryPoint
-
update
- Specified by:
updatein interfaceEntryPoint
-
update
- Specified by:
updatein interfaceEntryPoint
-
update
public void update(FactHandle factHandle, Object object, org.drools.util.bitmask.BitMask mask, Class<?> modifiedClass, InternalMatch internalMatch) modify is implemented as half way retract / assert due to the truth maintenance issues.- Specified by:
updatein interfaceInternalWorkingMemoryActions- Specified by:
updatein interfaceWorkingMemoryEntryPoint- See Also:
-
getNodeMemory
Retrieve theJoinMemoryfor a particularJoinNode.- Specified by:
getNodeMemoryin interfaceReteEvaluator- Parameters:
node- TheJoinNodekey.- Returns:
- The node's memory.
-
clearNodeMemory
- Specified by:
clearNodeMemoryin interfaceInternalWorkingMemory
-
getNodeMemories
- Specified by:
getNodeMemoriesin interfaceInternalWorkingMemory- Specified by:
getNodeMemoriesin interfaceReteEvaluator
-
getRuleRuntimeEventSupport
- Specified by:
getRuleRuntimeEventSupportin interfaceEventSupport- Specified by:
getRuleRuntimeEventSupportin interfaceReteEvaluator
-
getAgendaEventSupport
- Specified by:
getAgendaEventSupportin interfaceEventSupport- Specified by:
getAgendaEventSupportin interfaceReteEvaluator
-
getNextPropagationIdCounter
public long getNextPropagationIdCounter()- Specified by:
getNextPropagationIdCounterin interfaceReteEvaluator
-
getLock
- Specified by:
getLockin interfaceInternalWorkingMemory
-
startProcess
- Specified by:
startProcessin interfaceProcessRuntime- Specified by:
startProcessin interfaceWorkingMemory
-
startProcess
- Specified by:
startProcessin interfaceProcessRuntime- Specified by:
startProcessin interfaceWorkingMemory
-
startProcess
- Specified by:
startProcessin interfaceProcessRuntime
-
startProcess
public ProcessInstance startProcess(String processId, Map<String, Object> parameters, AgendaFilter agendaFilter) - Specified by:
startProcessin interfaceProcessRuntime
-
createProcessInstance
- Specified by:
createProcessInstancein interfaceProcessRuntime
-
startProcessInstance
- Specified by:
startProcessInstancein interfaceProcessRuntime
-
getProcessInstances
- Specified by:
getProcessInstancesin interfaceProcessRuntime- Specified by:
getProcessInstancesin interfaceWorkingMemory
-
getProcessInstance
- Specified by:
getProcessInstancein interfaceProcessRuntime- Specified by:
getProcessInstancein interfaceWorkingMemory
-
startProcess
public ProcessInstance startProcess(String processId, CorrelationKey correlationKey, Map<String, Object> parameters) - Specified by:
startProcessin interfaceCorrelationAwareProcessRuntime
-
createProcessInstance
public ProcessInstance createProcessInstance(String processId, CorrelationKey correlationKey, Map<String, Object> parameters) - Specified by:
createProcessInstancein interfaceCorrelationAwareProcessRuntime
-
getProcessInstance
- Specified by:
getProcessInstancein interfaceCorrelationAwareProcessRuntime
-
getProcessInstance
- Specified by:
getProcessInstancein interfaceProcessRuntime- Specified by:
getProcessInstancein interfaceWorkingMemory
-
getWorkItemManager
- Specified by:
getWorkItemManagerin interfaceProcessRuntime- Specified by:
getWorkItemManagerin interfaceWorkingMemory
-
getObjectTypeConfigurationRegistry
- Specified by:
getObjectTypeConfigurationRegistryin interfaceWorkingMemoryEntryPoint
-
getInitialFactHandle
- Specified by:
getInitialFactHandlein interfaceInternalWorkingMemory
-
setInitialFactHandle
-
getTimerService
- Specified by:
getTimerServicein interfaceInternalKnowledgeRuntime- Specified by:
getTimerServicein interfaceReteEvaluator
-
createTimerService
-
getSessionClock
- Specified by:
getSessionClockin interfaceKieRuntime- Specified by:
getSessionClockin interfaceReteEvaluator
-
startBatchExecution
public void startBatchExecution()- Specified by:
startBatchExecutionin interfaceInternalWorkingMemory
-
endBatchExecution
public void endBatchExecution()- Specified by:
endBatchExecutionin interfaceInternalWorkingMemory
-
getKnowledgeRuntime
- Specified by:
getKnowledgeRuntimein interfaceInternalWorkingMemory
-
registerChannel
- Specified by:
registerChannelin interfaceKieRuntime
-
unregisterChannel
- Specified by:
unregisterChannelin interfaceKieRuntime
-
getChannels
- Specified by:
getChannelsin interfaceInternalWorkingMemory- Specified by:
getChannelsin interfaceKieRuntime
-
getFactCount
public long getFactCount()- Specified by:
getFactCountin interfaceEntryPoint
-
getTotalFactCount
public long getTotalFactCount()- Specified by:
getTotalFactCountin interfaceInternalWorkingMemory
-
startOperation
This method must be called before starting any new work in the engine, like inserting a new fact or firing a new rule. It will reset the engine idle time counter. This method must be extremely light to avoid contentions when called by multiple threads/entry-points- Specified by:
startOperationin interfaceReteEvaluator
-
setEndOperationListener
- Specified by:
setEndOperationListenerin interfaceInternalKnowledgeRuntime
-
endOperation
This method must be called after finishing any work in the engine, like inserting a new fact or firing a new rule. It will reset the engine idle time counter. This method must be extremely light to avoid contentions when called by multiple threads/entry-points- Specified by:
endOperationin interfaceReteEvaluator
-
getCurrentTime
public long getCurrentTime()- Specified by:
getCurrentTimein interfaceorg.drools.base.base.ValueResolver
-
getRuleBase
public org.drools.base.RuleBase getRuleBase()- Specified by:
getRuleBasein interfaceorg.drools.base.base.ValueResolver
-
getIdleTime
public long getIdleTime()Returns the number of time units (usually ms) that the engine is idle according to the session clock or -1 if it is not idle. This method is not synchronised and might return an approximate value.- Specified by:
getIdleTimein interfaceInternalWorkingMemory
-
getLastIdleTimestamp
public long getLastIdleTimestamp()- Specified by:
getLastIdleTimestampin interfaceInternalKnowledgeRuntime
-
getTimeToNextJob
public long getTimeToNextJob()Returns the number of time units (usually ms) to the next scheduled job- Specified by:
getTimeToNextJobin interfaceInternalWorkingMemory- Returns:
- the number of time units until the next scheduled job or -1 if there is no job scheduled
-
addPropagation
- Specified by:
addPropagationin interfaceReteEvaluator
-
flushPropagations
public void flushPropagations()- Specified by:
flushPropagationsin interfaceInternalWorkingMemory
-
notifyWaitOnRest
public void notifyWaitOnRest()- Specified by:
notifyWaitOnRestin interfaceInternalWorkingMemory
-
getActionsIterator
- Specified by:
getActionsIteratorin interfaceInternalWorkingMemory
-
activate
public void activate()- Specified by:
activatein interfaceInternalWorkingMemory
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceInternalWorkingMemory
-
tryDeactivate
public boolean tryDeactivate()- Specified by:
tryDeactivatein interfaceInternalWorkingMemory
-
cancelActivation
- Specified by:
cancelActivationin interfaceInternalWorkingMemory
-
toString
-
startProcessFromNodeIds
public ProcessInstance startProcessFromNodeIds(String processId, Map<String, Object> params, String... nodeInstancesIds) - Specified by:
startProcessFromNodeIdsin interfaceProcessRuntime
-
startProcessFromNodeIds
public ProcessInstance startProcessFromNodeIds(String processId, CorrelationKey key, Map<String, Object> params, String... nodeIds) - Specified by:
startProcessFromNodeIdsin interfaceCorrelationAwareProcessRuntime
-