Interface InternalWorkingMemory

    • Method Detail

      • getAgenda

        InternalAgenda getAgenda()
        Description copied from interface: WorkingMemory
        Returns the Agenda for this WorkingMemory. While the WorkingMemory interface is considered public, the Agenda interface is more subject to change.
        Specified by:
        getAgenda in interface WorkingMemory
        Returns:
        the Agenda
      • getIdentifier

        long getIdentifier()
      • setIdentifier

        void setIdentifier​(long id)
      • setRuleRuntimeEventSupport

        void setRuleRuntimeEventSupport​(RuleRuntimeEventSupport workingMemoryEventSupport)
      • setAgendaEventSupport

        void setAgendaEventSupport​(AgendaEventSupport agendaEventSupport)
      • getLock

        java.util.concurrent.locks.Lock getLock()
      • 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:
        getEntryPoints in interface ReteEvaluator
      • startBatchExecution

        void startBatchExecution()
      • endBatchExecution

        void endBatchExecution()
      • startOperation

        void 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:
        startOperation in interface ReteEvaluator
      • endOperation

        void 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:
        endOperation in interface ReteEvaluator
      • 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()
      • prepareToFireActivation

        void prepareToFireActivation()
        This method is called by the agenda before firing a new activation to ensure the working memory is in a safe state to fire the activation.
      • activationFired

        void activationFired()
        This method is called by the agenda right after an activation was fired to allow the working memory to resume any activities blocked during activation firing.
      • 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:
      • 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​(Activation activation,
                              boolean declarativeAgenda)