Package org.drools.core.common
Interface InternalWorkingMemory
-
- All Superinterfaces:
org.kie.api.runtime.rule.EntryPoint,EventSupport,org.kie.api.event.kiebase.KieBaseEventManager,ReteEvaluator,org.drools.base.base.ValueResolver,WorkingMemory,WorkingMemoryEntryPoint,WorkingMemoryEventManager
- All Known Subinterfaces:
InternalWorkingMemoryActions
public interface InternalWorkingMemory extends WorkingMemory, WorkingMemoryEntryPoint, EventSupport
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.drools.core.common.ReteEvaluator
ReteEvaluator.InternalOperationType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidactivate()voidcancelActivation(InternalMatch internalMatch, boolean declarativeAgenda)voidclearNodeMemory(MemoryFactory node)voidcloseLiveQuery(InternalFactHandle factHandle)voiddeactivate()voidendBatchExecution()voidflushPropagations()java.util.Iterator<? extends PropagationEntry>getActionsIterator()InternalAgendagetAgenda()Returns the Agenda for this WorkingMemory.java.util.Map<java.lang.String,org.kie.api.runtime.Channel>getChannels()Returns a map of channel Id->Channel of all channels in this working memoryjava.util.Collection<? extends org.kie.api.runtime.rule.EntryPoint>getEntryPoints()longgetIdentifier()longgetIdleTime()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.InternalFactHandlegetInitialFactHandle()InternalKnowledgeRuntimegetKnowledgeRuntime()java.util.concurrent.locks.LockgetLock()NodeMemoriesgetNodeMemories()InternalProcessRuntimegetProcessRuntime()default FactHandleClassStoregetStoreForClass(java.lang.Class<?> clazz)longgetTimeToNextJob()Returns the number of time units (usually ms) to the next scheduled joblonggetTotalFactCount()Returns the total number of facts in the working memory, i.e., counting all facts from all entry points.InternalProcessRuntimeinternalGetProcessRuntime()default booleanisThreadSafe()voidnotifyWaitOnRest()voidremoveGlobal(java.lang.String identifier)voidsetAgendaEventSupport(AgendaEventSupport agendaEventSupport)voidsetIdentifier(long id)voidsetRuleRuntimeEventSupport(RuleRuntimeEventSupport workingMemoryEventSupport)voidstartBatchExecution()booleantryDeactivate()voidupdateEntryPointsCache()-
Methods inherited from interface org.kie.api.runtime.rule.EntryPoint
delete, delete, getEntryPointId, getFactCount, getFactHandle, getFactHandles, getFactHandles, getObject, getObjects, getObjects, insert, retract, update, update
-
Methods inherited from interface org.drools.core.common.EventSupport
getAgendaEventListeners, getAgendaEventSupport, getRuleEventSupport, getRuleRuntimeEventListeners, getRuleRuntimeEventSupport
-
Methods inherited from interface org.kie.api.event.kiebase.KieBaseEventManager
addEventListener, getKieBaseEventListeners, removeEventListener
-
Methods inherited from interface org.drools.core.common.ReteEvaluator
addPropagation, createFactHandle, createKnowledgeHelper, dispose, enableTMS, endOperation, getActivationsManager, getAgendaEventSupport, getCalendars, getDefaultEntryPoint, getDefaultEntryPointId, getEntryPoint, getFactHandle, getFactHandleFactory, getGlobal, getKnowledgeBase, getNextPropagationIdCounter, getNodeMemory, getRuleEventSupport, getRuleRuntimeEventSupport, getRuleSessionConfiguration, getSessionClock, getSessionConfiguration, getTimerJobInstances, getTimerService, getWorkingMemoryActionListener, insert, isSequential, isTMSEnabled, onWorkingMemoryAction, setWorkingMemoryActionListener, startOperation
-
Methods inherited from interface org.drools.base.base.ValueResolver
getCurrentTime, getGlobalResolver, getRuleBase
-
Methods inherited from interface org.drools.core.WorkingMemory
clearActivationGroup, clearAgenda, clearAgendaGroup, clearRuleFlowGroup, fireAllRules, fireAllRules, fireAllRules, fireAllRules, getEnvironment, getProcessInstance, getProcessInstance, getProcessInstances, getQueryResults, getWorkItemManager, halt, iterateFactHandles, iterateFactHandles, iterateObjects, iterateObjects, setFocus, setGlobal, setGlobalResolver, startProcess, startProcess
-
Methods inherited from interface org.drools.core.WorkingMemoryEntryPoint
delete, delete, dispose, getEntryPoint, getEntryPointNode, getHandleFactory, getKnowledgeBase, getObjectStore, getObjectTypeConfigurationRegistry, getReteEvaluator, getRuleUnit, insert, reset, setRuleUnit, update
-
Methods inherited from interface org.drools.core.WorkingMemoryEventManager
addEventListener, addEventListener, getAgendaEventListeners, getRuleRuntimeEventListeners, removeEventListener, removeEventListener
-
-
-
-
Method Detail
-
getAgenda
InternalAgenda getAgenda()
Description copied from interface:WorkingMemoryReturns the Agenda for this WorkingMemory. While the WorkingMemory interface is considered public, the Agenda interface is more subject to change.- Specified by:
getAgendain interfaceWorkingMemory- Returns:
- the Agenda
-
getIdentifier
long getIdentifier()
- Specified by:
getIdentifierin interfaceReteEvaluator
-
setIdentifier
void setIdentifier(long id)
-
setRuleRuntimeEventSupport
void setRuleRuntimeEventSupport(RuleRuntimeEventSupport workingMemoryEventSupport)
-
setAgendaEventSupport
void setAgendaEventSupport(AgendaEventSupport agendaEventSupport)
-
clearNodeMemory
void clearNodeMemory(MemoryFactory node)
-
getNodeMemories
NodeMemories getNodeMemories()
- Specified by:
getNodeMemoriesin interfaceReteEvaluator
-
getStoreForClass
default FactHandleClassStore getStoreForClass(java.lang.Class<?> clazz)
- Specified by:
getStoreForClassin interfaceReteEvaluator
-
getLock
java.util.concurrent.locks.Lock getLock()
-
getInitialFactHandle
InternalFactHandle getInitialFactHandle()
-
getKnowledgeRuntime
InternalKnowledgeRuntime getKnowledgeRuntime()
-
getChannels
java.util.Map<java.lang.String,org.kie.api.runtime.Channel> getChannels()
Returns a map of channel Id->Channel of all channels in this working memory- Returns:
-
getEntryPoints
java.util.Collection<? extends org.kie.api.runtime.rule.EntryPoint> getEntryPoints()
- Specified by:
getEntryPointsin interfaceReteEvaluator
-
startBatchExecution
void startBatchExecution()
-
endBatchExecution
void endBatchExecution()
-
getIdleTime
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.- Returns:
-
getTimeToNextJob
long getTimeToNextJob()
Returns the number of time units (usually ms) to the next scheduled job- Returns:
- the number of time units until the next scheduled job or -1 if there is no job scheduled
-
updateEntryPointsCache
void updateEntryPointsCache()
-
getTotalFactCount
long getTotalFactCount()
Returns the total number of facts in the working memory, i.e., counting all facts from all entry points. This is an approximate value and may not be accurate due to the concurrent nature of the entry points.- Returns:
-
getProcessRuntime
InternalProcessRuntime getProcessRuntime()
-
internalGetProcessRuntime
InternalProcessRuntime internalGetProcessRuntime()
-
closeLiveQuery
void closeLiveQuery(InternalFactHandle factHandle)
-
flushPropagations
void flushPropagations()
-
activate
void activate()
-
deactivate
void deactivate()
-
tryDeactivate
boolean tryDeactivate()
-
getActionsIterator
java.util.Iterator<? extends PropagationEntry> getActionsIterator()
-
removeGlobal
void removeGlobal(java.lang.String identifier)
-
notifyWaitOnRest
void notifyWaitOnRest()
-
cancelActivation
void cancelActivation(InternalMatch internalMatch, boolean declarativeAgenda)
-
isThreadSafe
default boolean isThreadSafe()
- Specified by:
isThreadSafein interfaceReteEvaluator
-
-