Class ScheduledExecution


  • public class ScheduledExecution
    extends java.lang.Object
    The Scheduled Execution is responsible for firing enabled activations of its RuleBase, when its Scheduler notifies it.
    • Constructor Detail

      • ScheduledExecution

        public ScheduledExecution​(EventRealm eventRealm,
                                  Agenda agenda,
                                  IExecutor executor)
        Creates an execution for the given EventRealm, Executor and Agenda. Executions are usually created as part of an ExecutionSchema through the EventDrivenVM.createExecutionSchema methods.
        Parameters:
        eventRealm -
        executor -
        agenda -
      • ScheduledExecution

        public ScheduledExecution​(EventRealm eventRealm)
        Creates an execution for the given EventRealm. Executions are usually created as part of an ExecutionSchema through the EventDrivenVM.createExecutionSchema methods.
        Parameters:
        eventRealm -
        executor -
        agenda -
      • ScheduledExecution

        public ScheduledExecution​(RuleBase ruleBase,
                                  IExecutor executor)
        Creates an execution for the given Executor and RuleBase. Executions are usually created as part of an ExecutionSchema through the EventDrivenVM.createExecutionSchema methods.
        Parameters:
        eventRealm -
        executor -
        ruleBase -
    • Method Detail

      • getRuleBase

        public RuleBase getRuleBase()
      • getExecutor

        public IExecutor getExecutor()
      • schedule

        protected void schedule()
      • startScheduling

        protected boolean startScheduling()
        This method is called from schedule() to indicate that a new call was received. If there is already scheduling in progress, that is logged and false is returned. Otherwise, a new scheduling starts, which is logged and stored.
        Returns:
        true, if the firing strategy can start, false otherwise
      • endScheduling

        protected void endScheduling()
        This method is called by schedule() to indicate that the firing strategy is finished its execution. This is logged and the scheduling state is set to false.
      • dispose

        protected void dispose()
        Disposes of the execution by disposing its ruleBase.