Class RuleUnitSessionImpl

  • All Implemented Interfaces:
    Externalizable, Serializable, org.drools.core.common.EventSupport, org.drools.core.common.InternalKnowledgeRuntime, org.drools.core.common.InternalWorkingMemory, org.drools.core.common.InternalWorkingMemoryActions, org.drools.core.WorkingMemory, org.drools.core.WorkingMemoryEntryPoint, org.drools.core.WorkingMemoryEventManager, org.kie.api.event.kiebase.KieBaseEventManager, org.kie.api.event.KieRuntimeEventManager, org.kie.api.event.process.ProcessEventManager, org.kie.api.event.rule.RuleRuntimeEventManager, org.kie.api.runtime.CommandExecutor, org.kie.api.runtime.KieRuntime, org.kie.api.runtime.KieSession, org.kie.api.runtime.process.ProcessRuntime, org.kie.api.runtime.process.StatefulProcessSession, org.kie.api.runtime.rule.EntryPoint, org.kie.api.runtime.rule.RuleRuntime, org.kie.api.runtime.rule.StatefulRuleSession, org.kie.internal.event.rule.RuleEventManager, org.kie.internal.process.CorrelationAwareProcessRuntime, org.kie.internal.runtime.StatefulKnowledgeSession

    public class RuleUnitSessionImpl
    extends org.drools.core.impl.AbstractRuntime
    implements org.kie.internal.runtime.StatefulKnowledgeSession, org.drools.core.WorkingMemoryEntryPoint, org.drools.core.common.InternalKnowledgeRuntime, org.kie.api.runtime.KieSession, org.kie.api.event.KieRuntimeEventManager, org.drools.core.common.InternalWorkingMemoryActions, org.drools.core.common.EventSupport, org.kie.internal.event.rule.RuleEventManager, org.kie.api.event.process.ProcessEventManager, org.kie.internal.process.CorrelationAwareProcessRuntime, Externalizable
    See Also:
    Serialized Form
    • Constructor Detail

      • RuleUnitSessionImpl

        public RuleUnitSessionImpl​(InternalRuleUnitExecutor ruleUnitExecutor,
                                   org.drools.core.impl.StatefulKnowledgeSessionImpl session)
    • Method Detail

      • getSession

        public org.drools.core.impl.StatefulKnowledgeSessionImpl getSession()
      • createKnowledgeHelper

        public org.drools.core.spi.KnowledgeHelper createKnowledgeHelper()
        Specified by:
        createKnowledgeHelper in interface org.drools.core.common.InternalWorkingMemory
      • createKnowledgeHelper

        public org.drools.core.spi.KnowledgeHelper createKnowledgeHelper​(org.drools.core.spi.Activation activation)
        Specified by:
        createKnowledgeHelper in interface org.drools.core.common.InternalWorkingMemory
      • init

        public void init​(org.drools.core.SessionConfiguration config,
                         org.kie.api.runtime.Environment environment)
      • bindRuleBase

        public void bindRuleBase​(org.drools.core.impl.InternalKnowledgeBase kBase,
                                 org.drools.core.common.InternalAgenda agenda,
                                 boolean initInitFactHandle)
      • setHandleFactory

        public void setHandleFactory​(org.drools.core.spi.FactHandleFactory handleFactory)
      • initEventSupports

        public void initEventSupports()
      • cancelActivation

        public void cancelActivation​(org.drools.core.spi.Activation activation,
                                     boolean declarativeAgenda)
        Specified by:
        cancelActivation in interface org.drools.core.common.InternalWorkingMemory
      • getPropagationList

        public org.drools.core.phreak.PropagationList getPropagationList()
        Specified by:
        getPropagationList in interface org.drools.core.common.InternalWorkingMemory
      • iterateObjectsToList

        public List iterateObjectsToList()
      • iterateNonDefaultEntryPointObjectsToList

        public List iterateNonDefaultEntryPointObjectsToList()
      • getActivationParameters

        public Map.Entry[] getActivationParameters​(long activationId)
      • getActivationParameters

        public Map getActivationParameters​(org.drools.core.spi.Activation activation)
      • getLogger

        public org.kie.api.logger.KieRuntimeLogger getLogger()
        Specified by:
        getLogger in interface org.kie.api.event.KieRuntimeEventManager
        Overrides:
        getLogger in class org.drools.core.impl.AbstractRuntime
      • setLogger

        public void setLogger​(org.kie.api.logger.KieRuntimeLogger logger)
        Overrides:
        setLogger in class org.drools.core.impl.AbstractRuntime
      • onSuspend

        public void onSuspend()
        Specified by:
        onSuspend in interface org.drools.core.common.InternalWorkingMemory
      • onResume

        public void onResume()
        Specified by:
        onResume in interface org.drools.core.common.InternalWorkingMemory
      • setStateless

        public org.drools.core.impl.StatefulKnowledgeSessionImpl setStateless​(boolean stateless)
      • initMBeans

        public void initMBeans​(String containerId,
                               String kbaseName,
                               String ksessionName)
      • getTruthMaintenanceSystem

        public org.drools.core.common.TruthMaintenanceSystem getTruthMaintenanceSystem()
        Specified by:
        getTruthMaintenanceSystem in interface org.drools.core.WorkingMemoryEntryPoint
      • getHandleFactory

        public org.drools.core.spi.FactHandleFactory getHandleFactory()
        Specified by:
        getHandleFactory in interface org.drools.core.WorkingMemoryEntryPoint
      • getKieRuntime

        public <T> T getKieRuntime​(Class<T> cls)
        Specified by:
        getKieRuntime in interface org.kie.api.runtime.KieSession
      • createRuntimeService

        public <T> T createRuntimeService​(Class<T> cls)
      • getEntryPoint

        public org.drools.core.WorkingMemoryEntryPoint getEntryPoint​(String name)
        Specified by:
        getEntryPoint in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getEntryPoint in interface org.kie.api.runtime.rule.RuleRuntime
      • getEntryPoints

        public Collection<? extends org.kie.api.runtime.rule.EntryPoint> getEntryPoints()
        Specified by:
        getEntryPoints in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getEntryPoints in interface org.kie.api.runtime.rule.RuleRuntime
      • getEntryPointMap

        public Map<String,​org.drools.core.WorkingMemoryEntryPoint> getEntryPointMap()
      • getRuleRuntimeEventListeners

        public Collection<org.kie.api.event.rule.RuleRuntimeEventListener> getRuleRuntimeEventListeners()
        Specified by:
        getRuleRuntimeEventListeners in interface org.drools.core.common.EventSupport
        Specified by:
        getRuleRuntimeEventListeners in interface org.kie.api.event.rule.RuleRuntimeEventManager
        Specified by:
        getRuleRuntimeEventListeners in interface org.drools.core.WorkingMemoryEventManager
      • getAgendaEventListeners

        public Collection<org.kie.api.event.rule.AgendaEventListener> getAgendaEventListeners()
        Specified by:
        getAgendaEventListeners in interface org.drools.core.common.EventSupport
        Specified by:
        getAgendaEventListeners in interface org.kie.api.event.rule.RuleRuntimeEventManager
        Specified by:
        getAgendaEventListeners in interface org.drools.core.WorkingMemoryEventManager
      • getProcessRuntime

        public org.drools.core.runtime.process.InternalProcessRuntime getProcessRuntime()
        Specified by:
        getProcessRuntime in interface org.drools.core.common.InternalKnowledgeRuntime
        Specified by:
        getProcessRuntime in interface org.drools.core.common.InternalWorkingMemory
      • internalGetProcessRuntime

        public org.drools.core.runtime.process.InternalProcessRuntime internalGetProcessRuntime()
        Specified by:
        internalGetProcessRuntime in interface org.drools.core.common.InternalWorkingMemory
      • addEventListener

        public void addEventListener​(org.kie.api.event.process.ProcessEventListener listener)
        Specified by:
        addEventListener in interface org.kie.api.event.process.ProcessEventManager
      • getProcessEventListeners

        public Collection<org.kie.api.event.process.ProcessEventListener> getProcessEventListeners()
        Specified by:
        getProcessEventListeners in interface org.kie.api.event.process.ProcessEventManager
      • removeEventListener

        public void removeEventListener​(org.kie.api.event.process.ProcessEventListener listener)
        Specified by:
        removeEventListener in interface org.kie.api.event.process.ProcessEventManager
      • getKieBase

        public org.kie.api.KieBase getKieBase()
        Specified by:
        getKieBase in interface org.kie.api.runtime.KieRuntime
        Specified by:
        getKieBase in interface org.kie.internal.runtime.StatefulKnowledgeSession
      • dispose

        public void dispose()
        Specified by:
        dispose in interface org.kie.api.runtime.KieSession
        Specified by:
        dispose in interface org.drools.core.WorkingMemoryEntryPoint
      • isAlive

        public boolean isAlive()
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.kie.api.runtime.KieSession
      • update

        public void update​(org.kie.api.runtime.rule.FactHandle factHandle)
      • abortProcessInstance

        public void abortProcessInstance​(long id)
        Specified by:
        abortProcessInstance in interface org.kie.api.runtime.process.ProcessRuntime
      • signalEvent

        public void signalEvent​(String type,
                                Object event)
        Specified by:
        signalEvent in interface org.kie.api.runtime.process.ProcessRuntime
      • signalEvent

        public void signalEvent​(String type,
                                Object event,
                                long processInstanceId)
        Specified by:
        signalEvent in interface org.kie.api.runtime.process.ProcessRuntime
      • getGlobals

        public org.kie.api.runtime.Globals getGlobals()
        Specified by:
        getGlobals in interface org.kie.api.runtime.KieRuntime
      • getFactHandles

        public <T extends org.kie.api.runtime.rule.FactHandle> Collection<T> getFactHandles()
        Specified by:
        getFactHandles in interface org.kie.api.runtime.rule.EntryPoint
      • getFactHandles

        public <T extends org.kie.api.runtime.rule.FactHandle> Collection<T> getFactHandles​(org.kie.api.runtime.ObjectFilter filter)
        Specified by:
        getFactHandles in interface org.kie.api.runtime.rule.EntryPoint
      • getObjects

        public Collection<?> getObjects()
        Specified by:
        getObjects in interface org.kie.api.runtime.rule.EntryPoint
      • getObjects

        public Collection<?> getObjects​(org.kie.api.runtime.ObjectFilter filter)
        Specified by:
        getObjects in interface org.kie.api.runtime.rule.EntryPoint
      • execute

        public <T> T execute​(org.kie.api.command.Command<T> command)
        Specified by:
        execute in interface org.kie.api.runtime.CommandExecutor
      • initInitialFact

        public org.drools.core.common.InternalFactHandle initInitialFact​(org.drools.core.impl.InternalKnowledgeBase kBase,
                                                                         org.drools.core.marshalling.impl.MarshallerReaderContext context)
      • initInitialFact

        public org.drools.core.common.InternalFactHandle initInitialFact​(org.drools.core.impl.InternalKnowledgeBase kBase,
                                                                         org.drools.core.common.InternalWorkingMemoryEntryPoint entryPoint,
                                                                         org.drools.core.rule.EntryPointId epId,
                                                                         org.drools.core.marshalling.impl.MarshallerReaderContext context)
      • getEntryPointId

        public String getEntryPointId()
        Specified by:
        getEntryPointId in interface org.kie.api.runtime.rule.EntryPoint
      • getQueryResultsFromRHS

        public org.drools.core.QueryResultsImpl getQueryResultsFromRHS​(String queryName,
                                                                       Object... arguments)
      • getQueryResults

        public org.drools.core.QueryResultsImpl getQueryResults​(String queryName,
                                                                Object... arguments)
        Specified by:
        getQueryResults in interface org.kie.api.runtime.rule.RuleRuntime
        Specified by:
        getQueryResults in interface org.drools.core.WorkingMemory
      • openLiveQuery

        public org.kie.api.runtime.rule.LiveQuery openLiveQuery​(String query,
                                                                Object[] arguments,
                                                                org.kie.api.runtime.rule.ViewChangedEventListener listener)
        Specified by:
        openLiveQuery in interface org.kie.api.runtime.rule.RuleRuntime
      • closeLiveQuery

        public void closeLiveQuery​(org.drools.core.common.InternalFactHandle factHandle)
        Specified by:
        closeLiveQuery in interface org.drools.core.common.InternalWorkingMemory
      • getEntryPoint

        public org.drools.core.rule.EntryPointId getEntryPoint()
        Specified by:
        getEntryPoint in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getEntryPoint in interface org.drools.core.WorkingMemoryEntryPoint
      • getInternalWorkingMemory

        public org.drools.core.common.InternalWorkingMemory getInternalWorkingMemory()
        Specified by:
        getInternalWorkingMemory in interface org.drools.core.WorkingMemoryEntryPoint
      • updateEntryPointsCache

        public void updateEntryPointsCache()
        Specified by:
        updateEntryPointsCache in interface org.drools.core.common.InternalWorkingMemory
      • getSessionConfiguration

        public org.drools.core.SessionConfiguration getSessionConfiguration()
        Specified by:
        getSessionConfiguration in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getSessionConfiguration in interface org.kie.api.runtime.KieRuntime
      • reset

        public void reset()
        Specified by:
        reset in interface org.drools.core.WorkingMemoryEntryPoint
      • reset

        public void reset​(long handleId,
                          long handleCounter,
                          long propagationCounter)
      • setRuleRuntimeEventSupport

        public void setRuleRuntimeEventSupport​(org.drools.core.event.RuleRuntimeEventSupport ruleRuntimeEventSupport)
        Specified by:
        setRuleRuntimeEventSupport in interface org.drools.core.common.InternalWorkingMemory
      • setAgendaEventSupport

        public void setAgendaEventSupport​(org.drools.core.event.AgendaEventSupport agendaEventSupport)
        Specified by:
        setAgendaEventSupport in interface org.drools.core.common.InternalWorkingMemory
      • isSequential

        public boolean isSequential()
        Specified by:
        isSequential in interface org.drools.core.common.InternalWorkingMemory
      • addEventListener

        public void addEventListener​(org.kie.api.event.rule.RuleRuntimeEventListener listener)
        Specified by:
        addEventListener in interface org.kie.api.event.rule.RuleRuntimeEventManager
        Specified by:
        addEventListener in interface org.drools.core.WorkingMemoryEventManager
      • removeEventListener

        public void removeEventListener​(org.kie.api.event.rule.RuleRuntimeEventListener listener)
        Specified by:
        removeEventListener in interface org.kie.api.event.rule.RuleRuntimeEventManager
        Specified by:
        removeEventListener in interface org.drools.core.WorkingMemoryEventManager
      • addEventListener

        public void addEventListener​(org.kie.api.event.rule.AgendaEventListener listener)
        Specified by:
        addEventListener in interface org.kie.api.event.rule.RuleRuntimeEventManager
        Specified by:
        addEventListener in interface org.drools.core.WorkingMemoryEventManager
      • removeEventListener

        public void removeEventListener​(org.kie.api.event.rule.AgendaEventListener listener)
        Specified by:
        removeEventListener in interface org.kie.api.event.rule.RuleRuntimeEventManager
        Specified by:
        removeEventListener in interface org.drools.core.WorkingMemoryEventManager
      • addEventListener

        public void addEventListener​(org.kie.api.event.kiebase.KieBaseEventListener listener)
        Specified by:
        addEventListener in interface org.kie.api.event.kiebase.KieBaseEventManager
      • getKieBaseEventListeners

        public Collection<org.kie.api.event.kiebase.KieBaseEventListener> getKieBaseEventListeners()
        Specified by:
        getKieBaseEventListeners in interface org.kie.api.event.kiebase.KieBaseEventManager
      • removeEventListener

        public void removeEventListener​(org.kie.api.event.kiebase.KieBaseEventListener listener)
        Specified by:
        removeEventListener in interface org.kie.api.event.kiebase.KieBaseEventManager
      • getRuleEventSupport

        public org.drools.core.event.RuleEventListenerSupport getRuleEventSupport()
        Specified by:
        getRuleEventSupport in interface org.drools.core.common.EventSupport
      • addEventListener

        public void addEventListener​(org.kie.internal.event.rule.RuleEventListener listener)
        Specified by:
        addEventListener in interface org.kie.internal.event.rule.RuleEventManager
      • removeEventListener

        public void removeEventListener​(org.kie.internal.event.rule.RuleEventListener listener)
        Specified by:
        removeEventListener in interface org.kie.internal.event.rule.RuleEventManager
      • getFactHandleFactory

        public org.drools.core.spi.FactHandleFactory getFactHandleFactory()
        Specified by:
        getFactHandleFactory in interface org.drools.core.common.InternalWorkingMemory
      • setGlobal

        public void setGlobal​(String identifier,
                              Object value)
        Specified by:
        setGlobal in interface org.kie.api.runtime.KieRuntime
        Specified by:
        setGlobal in interface org.drools.core.WorkingMemory
      • removeGlobal

        public void removeGlobal​(String identifier)
        Specified by:
        removeGlobal in interface org.drools.core.common.InternalWorkingMemory
      • setGlobalResolver

        public void setGlobalResolver​(org.drools.core.spi.GlobalResolver globalResolver)
        Specified by:
        setGlobalResolver in interface org.drools.core.WorkingMemory
      • getGlobalResolver

        public org.drools.core.spi.GlobalResolver getGlobalResolver()
        Specified by:
        getGlobalResolver in interface org.drools.core.WorkingMemory
      • getCalendars

        public org.kie.api.runtime.Calendars getCalendars()
        Specified by:
        getCalendars in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getCalendars in interface org.kie.api.runtime.KieRuntime
      • getId

        public int getId()
        Specified by:
        getId in interface org.kie.api.runtime.KieSession
      • getIdentifier

        public long getIdentifier()
        Specified by:
        getIdentifier in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getIdentifier in interface org.kie.api.runtime.KieSession
      • setIdentifier

        public void setIdentifier​(long id)
        Specified by:
        setIdentifier in interface org.drools.core.common.InternalKnowledgeRuntime
        Specified by:
        setIdentifier in interface org.drools.core.common.InternalWorkingMemory
      • getGlobal

        public Object getGlobal​(String identifier)
        Specified by:
        getGlobal in interface org.kie.api.runtime.KieRuntime
        Specified by:
        getGlobal in interface org.drools.core.WorkingMemory
      • getEnvironment

        public org.kie.api.runtime.Environment getEnvironment()
        Specified by:
        getEnvironment in interface org.kie.api.runtime.KieRuntime
        Specified by:
        getEnvironment in interface org.drools.core.WorkingMemory
      • getAgenda

        public org.drools.core.common.InternalAgenda getAgenda()
        Specified by:
        getAgenda in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getAgenda in interface org.kie.api.runtime.rule.RuleRuntime
        Specified by:
        getAgenda in interface org.drools.core.WorkingMemory
      • clearAgenda

        public void clearAgenda()
        Specified by:
        clearAgenda in interface org.drools.core.WorkingMemory
      • clearAgendaGroup

        public void clearAgendaGroup​(String group)
        Specified by:
        clearAgendaGroup in interface org.drools.core.WorkingMemory
      • clearActivationGroup

        public void clearActivationGroup​(String group)
        Specified by:
        clearActivationGroup in interface org.drools.core.WorkingMemory
      • clearRuleFlowGroup

        public void clearRuleFlowGroup​(String group)
        Specified by:
        clearRuleFlowGroup in interface org.drools.core.WorkingMemory
      • getKnowledgeBase

        public org.drools.core.impl.InternalKnowledgeBase getKnowledgeBase()
        Specified by:
        getKnowledgeBase in interface org.drools.core.WorkingMemory
        Specified by:
        getKnowledgeBase in interface org.drools.core.WorkingMemoryEntryPoint
      • halt

        public void halt()
        Specified by:
        halt in interface org.kie.api.runtime.rule.RuleRuntime
        Specified by:
        halt in interface org.drools.core.WorkingMemory
      • fireAllRules

        public int fireAllRules()
        Specified by:
        fireAllRules in interface org.kie.api.runtime.rule.StatefulRuleSession
        Specified by:
        fireAllRules in interface org.drools.core.WorkingMemory
      • fireAllRules

        public int fireAllRules​(int fireLimit)
        Specified by:
        fireAllRules in interface org.kie.api.runtime.rule.StatefulRuleSession
        Specified by:
        fireAllRules in interface org.drools.core.WorkingMemory
      • fireAllRules

        public int fireAllRules​(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
        Specified by:
        fireAllRules in interface org.kie.api.runtime.rule.StatefulRuleSession
        Specified by:
        fireAllRules in interface org.drools.core.WorkingMemory
      • fireAllRules

        public int fireAllRules​(org.kie.api.runtime.rule.AgendaFilter agendaFilter,
                                int fireLimit)
        Specified by:
        fireAllRules in interface org.kie.api.runtime.rule.StatefulRuleSession
        Specified by:
        fireAllRules in interface org.drools.core.WorkingMemory
      • fireUntilHalt

        public void fireUntilHalt()
        Specified by:
        fireUntilHalt in interface org.kie.api.runtime.rule.StatefulRuleSession
      • fireUntilHalt

        public void fireUntilHalt​(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
        Specified by:
        fireUntilHalt in interface org.kie.api.runtime.rule.StatefulRuleSession
      • getObject

        public Object getObject​(org.kie.api.runtime.rule.FactHandle handle)
        Specified by:
        getObject in interface org.kie.api.runtime.rule.EntryPoint
        Specified by:
        getObject in interface org.drools.core.WorkingMemory
      • getObjectStore

        public org.drools.core.common.ObjectStore getObjectStore()
        Specified by:
        getObjectStore in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getObjectStore in interface org.drools.core.WorkingMemoryEntryPoint
      • getFactHandle

        public org.kie.api.runtime.rule.FactHandle getFactHandle​(Object object)
        Specified by:
        getFactHandle in interface org.kie.api.runtime.rule.EntryPoint
        Specified by:
        getFactHandle in interface org.drools.core.WorkingMemory
      • getFactHandleByIdentity

        public org.kie.api.runtime.rule.FactHandle getFactHandleByIdentity​(Object object)
        Specified by:
        getFactHandleByIdentity in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getFactHandleByIdentity in interface org.drools.core.WorkingMemory
        Specified by:
        getFactHandleByIdentity in interface org.drools.core.WorkingMemoryEntryPoint
      • iterateObjects

        public Iterator iterateObjects()
        Specified by:
        iterateObjects in interface org.drools.core.WorkingMemory
      • iterateObjects

        public Iterator iterateObjects​(org.kie.api.runtime.ObjectFilter filter)
        Specified by:
        iterateObjects in interface org.drools.core.WorkingMemory
      • iterateFactHandles

        public Iterator<org.drools.core.common.InternalFactHandle> iterateFactHandles()
        Specified by:
        iterateFactHandles in interface org.drools.core.WorkingMemory
      • iterateFactHandles

        public Iterator<org.drools.core.common.InternalFactHandle> iterateFactHandles​(org.kie.api.runtime.ObjectFilter filter)
        Specified by:
        iterateFactHandles in interface org.drools.core.WorkingMemory
      • setFocus

        public void setFocus​(String focus)
        Specified by:
        setFocus in interface org.drools.core.WorkingMemory
      • insertAsync

        public org.kie.api.runtime.rule.FactHandle insertAsync​(Object object)
        Specified by:
        insertAsync in interface org.drools.core.common.InternalWorkingMemoryActions
      • insert

        public org.kie.api.runtime.rule.FactHandle insert​(Object object)
        Specified by:
        insert in interface org.kie.api.runtime.rule.EntryPoint
      • insert

        public org.kie.api.runtime.rule.FactHandle insert​(Object object,
                                                          boolean dynamic)
        Specified by:
        insert in interface org.drools.core.WorkingMemoryEntryPoint
      • submit

        public void submit​(org.kie.api.runtime.KieSession.AtomicAction action)
        Specified by:
        submit in interface org.kie.api.runtime.KieSession
      • updateTraits

        public void updateTraits​(org.drools.core.common.InternalFactHandle h,
                                 org.drools.core.util.bitmask.BitMask mask,
                                 Class<?> modifiedClass,
                                 org.drools.core.spi.Activation activation)
        Specified by:
        updateTraits in interface org.drools.core.common.InternalWorkingMemoryActions
      • shed

        public <T,​K,​X extends org.drools.core.factmodel.traits.TraitableBean> org.drools.core.factmodel.traits.Thing<K> shed​(org.drools.core.spi.Activation activation,
                                                                                                                                         org.drools.core.factmodel.traits.TraitableBean<K,​X> core,
                                                                                                                                         Class<T> trait)
        Specified by:
        shed in interface org.drools.core.common.InternalWorkingMemoryActions
      • don

        public <T,​K> T don​(org.drools.core.spi.Activation activation,
                                 K core,
                                 Collection<Class<? extends org.drools.core.factmodel.traits.Thing>> traits,
                                 boolean b,
                                 org.kie.api.internal.runtime.beliefs.Mode[] modes)
        Specified by:
        don in interface org.drools.core.common.InternalWorkingMemoryActions
      • don

        public <T,​K> T don​(org.drools.core.spi.Activation activation,
                                 K core,
                                 Class<T> trait,
                                 boolean b,
                                 org.kie.api.internal.runtime.beliefs.Mode[] modes)
        Specified by:
        don in interface org.drools.core.common.InternalWorkingMemoryActions
      • insert

        public org.kie.api.runtime.rule.FactHandle insert​(Object object,
                                                          boolean dynamic,
                                                          org.drools.core.definitions.rule.impl.RuleImpl rule,
                                                          org.drools.core.reteoo.TerminalNode terminalNode)
        Specified by:
        insert in interface org.drools.core.common.InternalWorkingMemoryActions
      • retract

        public void retract​(org.kie.api.runtime.rule.FactHandle handle)
        Specified by:
        retract in interface org.kie.api.runtime.rule.EntryPoint
      • delete

        public void delete​(org.kie.api.runtime.rule.FactHandle handle)
        Specified by:
        delete in interface org.kie.api.runtime.rule.EntryPoint
      • delete

        public void delete​(org.kie.api.runtime.rule.FactHandle handle,
                           org.kie.api.runtime.rule.FactHandle.State fhState)
        Specified by:
        delete in interface org.kie.api.runtime.rule.EntryPoint
      • delete

        public void delete​(org.kie.api.runtime.rule.FactHandle factHandle,
                           org.drools.core.definitions.rule.impl.RuleImpl rule,
                           org.drools.core.reteoo.TerminalNode terminalNode)
        Specified by:
        delete in interface org.drools.core.WorkingMemoryEntryPoint
      • delete

        public void delete​(org.kie.api.runtime.rule.FactHandle factHandle,
                           org.drools.core.definitions.rule.impl.RuleImpl rule,
                           org.drools.core.reteoo.TerminalNode terminalNode,
                           org.kie.api.runtime.rule.FactHandle.State fhState)
        Specified by:
        delete in interface org.drools.core.WorkingMemoryEntryPoint
      • getEntryPointNode

        public org.drools.core.reteoo.EntryPointNode getEntryPointNode()
        Specified by:
        getEntryPointNode in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getEntryPointNode in interface org.drools.core.WorkingMemoryEntryPoint
      • update

        public void update​(org.kie.api.runtime.rule.FactHandle handle,
                           Object object)
        Specified by:
        update in interface org.kie.api.runtime.rule.EntryPoint
      • update

        public void update​(org.kie.api.runtime.rule.FactHandle handle,
                           Object object,
                           String... modifiedProperties)
        Specified by:
        update in interface org.kie.api.runtime.rule.EntryPoint
      • update

        public void update​(org.kie.api.runtime.rule.FactHandle factHandle,
                           Object object,
                           org.drools.core.util.bitmask.BitMask mask,
                           Class<?> modifiedClass,
                           org.drools.core.spi.Activation activation)
        Specified by:
        update in interface org.drools.core.common.InternalWorkingMemoryActions
        Specified by:
        update in interface org.drools.core.WorkingMemoryEntryPoint
      • executeQueuedActions

        public void executeQueuedActions()
        Specified by:
        executeQueuedActions in interface org.drools.core.common.InternalKnowledgeRuntime
      • queueWorkingMemoryAction

        public void queueWorkingMemoryAction​(org.drools.core.common.WorkingMemoryAction action)
        Specified by:
        queueWorkingMemoryAction in interface org.drools.core.common.InternalKnowledgeRuntime
        Specified by:
        queueWorkingMemoryAction in interface org.drools.core.common.InternalWorkingMemory
      • getNodeMemory

        public <T extends org.drools.core.common.Memory> T getNodeMemory​(org.drools.core.common.MemoryFactory<T> node)
        Specified by:
        getNodeMemory in interface org.drools.core.common.InternalWorkingMemory
      • clearNodeMemory

        public void clearNodeMemory​(org.drools.core.common.MemoryFactory node)
        Specified by:
        clearNodeMemory in interface org.drools.core.common.InternalWorkingMemory
      • getNodeMemories

        public org.drools.core.common.NodeMemories getNodeMemories()
        Specified by:
        getNodeMemories in interface org.drools.core.common.InternalWorkingMemory
      • getRuleRuntimeEventSupport

        public org.drools.core.event.RuleRuntimeEventSupport getRuleRuntimeEventSupport()
        Specified by:
        getRuleRuntimeEventSupport in interface org.drools.core.common.EventSupport
      • getAgendaEventSupport

        public org.drools.core.event.AgendaEventSupport getAgendaEventSupport()
        Specified by:
        getAgendaEventSupport in interface org.drools.core.common.EventSupport
      • setAsyncExceptionHandler

        public void setAsyncExceptionHandler​(org.drools.core.spi.AsyncExceptionHandler handler)
        Specified by:
        setAsyncExceptionHandler in interface org.drools.core.WorkingMemory
      • getNextPropagationIdCounter

        public long getNextPropagationIdCounter()
        Specified by:
        getNextPropagationIdCounter in interface org.drools.core.common.InternalWorkingMemory
      • getPropagationIdCounter

        public long getPropagationIdCounter()
      • getLock

        public Lock getLock()
        Specified by:
        getLock in interface org.drools.core.common.InternalWorkingMemory
      • startProcess

        public org.kie.api.runtime.process.ProcessInstance startProcess​(String processId)
        Specified by:
        startProcess in interface org.kie.api.runtime.process.ProcessRuntime
        Specified by:
        startProcess in interface org.drools.core.WorkingMemory
      • startProcess

        public org.kie.api.runtime.process.ProcessInstance startProcess​(String processId,
                                                                        Map<String,​Object> parameters)
        Specified by:
        startProcess in interface org.kie.api.runtime.process.ProcessRuntime
        Specified by:
        startProcess in interface org.drools.core.WorkingMemory
      • startProcess

        public org.kie.api.runtime.process.ProcessInstance startProcess​(String processId,
                                                                        org.kie.api.runtime.rule.AgendaFilter agendaFilter)
        Specified by:
        startProcess in interface org.kie.api.runtime.process.ProcessRuntime
      • startProcess

        public org.kie.api.runtime.process.ProcessInstance startProcess​(String processId,
                                                                        Map<String,​Object> parameters,
                                                                        org.kie.api.runtime.rule.AgendaFilter agendaFilter)
        Specified by:
        startProcess in interface org.kie.api.runtime.process.ProcessRuntime
      • createProcessInstance

        public org.kie.api.runtime.process.ProcessInstance createProcessInstance​(String processId,
                                                                                 Map<String,​Object> parameters)
        Specified by:
        createProcessInstance in interface org.kie.api.runtime.process.ProcessRuntime
      • startProcessInstance

        public org.kie.api.runtime.process.ProcessInstance startProcessInstance​(long processInstanceId)
        Specified by:
        startProcessInstance in interface org.kie.api.runtime.process.ProcessRuntime
      • getProcessInstances

        public Collection<org.kie.api.runtime.process.ProcessInstance> getProcessInstances()
        Specified by:
        getProcessInstances in interface org.kie.api.runtime.process.ProcessRuntime
        Specified by:
        getProcessInstances in interface org.drools.core.WorkingMemory
      • getProcessInstance

        public org.kie.api.runtime.process.ProcessInstance getProcessInstance​(long processInstanceId)
        Specified by:
        getProcessInstance in interface org.kie.api.runtime.process.ProcessRuntime
        Specified by:
        getProcessInstance in interface org.drools.core.WorkingMemory
      • startProcess

        public org.kie.api.runtime.process.ProcessInstance startProcess​(String processId,
                                                                        org.kie.internal.process.CorrelationKey correlationKey,
                                                                        Map<String,​Object> parameters)
        Specified by:
        startProcess in interface org.kie.internal.process.CorrelationAwareProcessRuntime
      • createProcessInstance

        public org.kie.api.runtime.process.ProcessInstance createProcessInstance​(String processId,
                                                                                 org.kie.internal.process.CorrelationKey correlationKey,
                                                                                 Map<String,​Object> parameters)
        Specified by:
        createProcessInstance in interface org.kie.internal.process.CorrelationAwareProcessRuntime
      • getProcessInstance

        public org.kie.api.runtime.process.ProcessInstance getProcessInstance​(org.kie.internal.process.CorrelationKey correlationKey)
        Specified by:
        getProcessInstance in interface org.kie.internal.process.CorrelationAwareProcessRuntime
      • getProcessInstance

        public org.kie.api.runtime.process.ProcessInstance getProcessInstance​(long processInstanceId,
                                                                              boolean readOnly)
        Specified by:
        getProcessInstance in interface org.kie.api.runtime.process.ProcessRuntime
        Specified by:
        getProcessInstance in interface org.drools.core.WorkingMemory
      • getWorkItemManager

        public org.kie.api.runtime.process.WorkItemManager getWorkItemManager()
        Specified by:
        getWorkItemManager in interface org.kie.api.runtime.process.ProcessRuntime
        Specified by:
        getWorkItemManager in interface org.drools.core.WorkingMemory
      • getWorkingMemoryEntryPoint

        public org.drools.core.WorkingMemoryEntryPoint getWorkingMemoryEntryPoint​(String name)
        Specified by:
        getWorkingMemoryEntryPoint in interface org.drools.core.WorkingMemory
        Specified by:
        getWorkingMemoryEntryPoint in interface org.drools.core.WorkingMemoryEntryPoint
      • getWorkingMemoryEntryPoints

        public Map<String,​org.drools.core.WorkingMemoryEntryPoint> getWorkingMemoryEntryPoints()
      • getObjectTypeConfigurationRegistry

        public org.drools.core.common.ObjectTypeConfigurationRegistry getObjectTypeConfigurationRegistry()
        Specified by:
        getObjectTypeConfigurationRegistry in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getObjectTypeConfigurationRegistry in interface org.drools.core.WorkingMemoryEntryPoint
      • getInitialFactHandle

        public org.drools.core.common.InternalFactHandle getInitialFactHandle()
        Specified by:
        getInitialFactHandle in interface org.drools.core.common.InternalWorkingMemory
      • setInitialFactHandle

        public void setInitialFactHandle​(org.drools.core.common.InternalFactHandle initialFactHandle)
      • getTimerService

        public org.drools.core.time.TimerService getTimerService()
        Specified by:
        getTimerService in interface org.drools.core.common.InternalKnowledgeRuntime
        Specified by:
        getTimerService in interface org.drools.core.common.InternalWorkingMemory
      • getSessionClock

        public org.kie.api.time.SessionClock getSessionClock()
        Specified by:
        getSessionClock in interface org.kie.api.runtime.KieRuntime
        Specified by:
        getSessionClock in interface org.drools.core.WorkingMemory
      • startBatchExecution

        public void startBatchExecution()
        Specified by:
        startBatchExecution in interface org.drools.core.common.InternalWorkingMemory
      • endBatchExecution

        public void endBatchExecution()
        Specified by:
        endBatchExecution in interface org.drools.core.common.InternalWorkingMemory
      • getKnowledgeRuntime

        public org.drools.core.common.InternalKnowledgeRuntime getKnowledgeRuntime()
        Specified by:
        getKnowledgeRuntime in interface org.drools.core.common.InternalWorkingMemory
      • registerChannel

        public void registerChannel​(String name,
                                    org.kie.api.runtime.Channel channel)
        Specified by:
        registerChannel in interface org.kie.api.runtime.KieRuntime
      • unregisterChannel

        public void unregisterChannel​(String name)
        Specified by:
        unregisterChannel in interface org.kie.api.runtime.KieRuntime
      • getChannels

        public Map<String,​org.kie.api.runtime.Channel> getChannels()
        Specified by:
        getChannels in interface org.drools.core.common.InternalWorkingMemory
        Specified by:
        getChannels in interface org.kie.api.runtime.KieRuntime
      • getFactCount

        public long getFactCount()
        Specified by:
        getFactCount in interface org.kie.api.runtime.rule.EntryPoint
      • getTotalFactCount

        public long getTotalFactCount()
        Specified by:
        getTotalFactCount in interface org.drools.core.common.InternalWorkingMemory
      • startOperation

        public void startOperation()
        Specified by:
        startOperation in interface org.drools.core.common.InternalKnowledgeRuntime
        Specified by:
        startOperation in interface org.drools.core.common.InternalWorkingMemory
      • setEndOperationListener

        public void setEndOperationListener​(org.drools.core.common.EndOperationListener listener)
        Specified by:
        setEndOperationListener in interface org.drools.core.common.InternalKnowledgeRuntime
      • endOperation

        public void endOperation()
        Specified by:
        endOperation in interface org.drools.core.common.InternalKnowledgeRuntime
        Specified by:
        endOperation in interface org.drools.core.common.InternalWorkingMemory
      • getIdleTime

        public long getIdleTime()
        Specified by:
        getIdleTime in interface org.drools.core.common.InternalWorkingMemory
      • getLastIdleTimestamp

        public long getLastIdleTimestamp()
        Specified by:
        getLastIdleTimestamp in interface org.drools.core.common.InternalKnowledgeRuntime
      • prepareToFireActivation

        public void prepareToFireActivation()
        Specified by:
        prepareToFireActivation in interface org.drools.core.common.InternalWorkingMemory
      • activationFired

        public void activationFired()
        Specified by:
        activationFired in interface org.drools.core.common.InternalWorkingMemory
      • getTimeToNextJob

        public long getTimeToNextJob()
        Specified by:
        getTimeToNextJob in interface org.drools.core.common.InternalWorkingMemory
      • addPropagation

        public void addPropagation​(org.drools.core.phreak.PropagationEntry propagationEntry)
        Specified by:
        addPropagation in interface org.drools.core.common.InternalWorkingMemory
      • flushPropagations

        public void flushPropagations()
        Specified by:
        flushPropagations in interface org.drools.core.common.InternalWorkingMemory
      • notifyWaitOnRest

        public void notifyWaitOnRest()
        Specified by:
        notifyWaitOnRest in interface org.drools.core.common.InternalWorkingMemory
      • getActionsIterator

        public Iterator<? extends org.drools.core.phreak.PropagationEntry> getActionsIterator()
        Specified by:
        getActionsIterator in interface org.drools.core.common.InternalWorkingMemory
      • activate

        public void activate()
        Specified by:
        activate in interface org.drools.core.common.InternalWorkingMemory
      • deactivate

        public void deactivate()
        Specified by:
        deactivate in interface org.drools.core.common.InternalWorkingMemory
      • tryDeactivate

        public boolean tryDeactivate()
        Specified by:
        tryDeactivate in interface org.drools.core.common.InternalWorkingMemory
      • startProcessFromNodeIds

        public org.kie.api.runtime.process.ProcessInstance startProcessFromNodeIds​(String processId,
                                                                                   Map<String,​Object> params,
                                                                                   String... nodeIds)
        Specified by:
        startProcessFromNodeIds in interface org.kie.api.runtime.process.ProcessRuntime
      • startProcessFromNodeIds

        public org.kie.api.runtime.process.ProcessInstance startProcessFromNodeIds​(String processId,
                                                                                   org.kie.internal.process.CorrelationKey key,
                                                                                   Map<String,​Object> params,
                                                                                   String... nodeIds)
        Specified by:
        startProcessFromNodeIds in interface org.kie.internal.process.CorrelationAwareProcessRuntime