Class JobLogicMachine


  • public class JobLogicMachine
    extends AbstractLogicMachine<org.ikasan.spec.scheduled.instance.model.SchedulerJobInstance>
    • Constructor Summary

      Constructors 
      Constructor Description
      JobLogicMachine​(java.util.Map<java.lang.String,​org.ikasan.spec.metadata.ModuleMetaData> agents, org.ikasan.spec.scheduled.context.model.JobLockCache jobLockCache, org.ikasan.spec.scheduled.instance.service.ContextParametersInstanceService contextParametersInstanceService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addQueuedSchedulerJobInitiationEvent​(org.ikasan.spec.scheduled.instance.model.ContextInstance contextInstance, org.ikasan.spec.scheduled.instance.model.ContextInstance parentContextInstance, java.lang.String jobIdentifier, org.ikasan.spec.scheduled.event.model.SchedulerJobInitiationEvent event)  
      void addSchedulerJobStateChangeEventListener​(org.ikasan.spec.scheduled.core.listener.SchedulerJobInstanceStateChangeEventListener listener)
      Add a SchedulerJobInstanceStateChangeEventListener.
      protected java.util.List<org.ikasan.spec.scheduled.event.model.SchedulerJobInitiationEvent> getJobInitiationEvents​(org.ikasan.spec.scheduled.event.model.ContextualisedScheduledProcessEvent scheduledProcessEvent, org.ikasan.spec.scheduled.instance.model.ContextInstance contextInstance, org.ikasan.spec.scheduled.event.model.DryRunParameters dryRunParameters, java.util.Map<java.lang.String,​org.ikasan.spec.scheduled.instance.model.GlobalEventJobInstance> globalEventJobInstanceMap, java.util.Map<java.lang.String,​org.ikasan.spec.scheduled.instance.model.InternalEventDrivenJobInstance> internalEventDrivenJobs, java.util.List<org.ikasan.spec.scheduled.instance.model.ContextParameterInstance> contextParameters, org.ikasan.spec.scheduled.instance.model.ContextInstance parentContextInstance, org.apache.commons.lang3.mutable.MutableBoolean lockRaised, boolean markAsRaised)
      The method is responsible for determining if any job initiation events can be raised based on the receipt of a ContextualisedScheduledProcessEvent.
      protected void issueSchedulerJobStateChangeEvent​(org.ikasan.job.orchestration.model.event.SchedulerJobInstanceStateChangeEventImpl event)
      Issue a SchedulerJobInstanceStateChangeEvent to all registered listeners.
      void removeSchedulerJobStateChangeEventListener​(org.ikasan.spec.scheduled.core.listener.SchedulerJobInstanceStateChangeEventListener listener)
      Remove a SchedulerJobInstanceStateChangeEventListener.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JobLogicMachine

        public JobLogicMachine​(java.util.Map<java.lang.String,​org.ikasan.spec.metadata.ModuleMetaData> agents,
                               org.ikasan.spec.scheduled.context.model.JobLockCache jobLockCache,
                               org.ikasan.spec.scheduled.instance.service.ContextParametersInstanceService contextParametersInstanceService)
    • Method Detail

      • getJobInitiationEvents

        protected java.util.List<org.ikasan.spec.scheduled.event.model.SchedulerJobInitiationEvent> getJobInitiationEvents​(org.ikasan.spec.scheduled.event.model.ContextualisedScheduledProcessEvent scheduledProcessEvent,
                                                                                                                           org.ikasan.spec.scheduled.instance.model.ContextInstance contextInstance,
                                                                                                                           org.ikasan.spec.scheduled.event.model.DryRunParameters dryRunParameters,
                                                                                                                           java.util.Map<java.lang.String,​org.ikasan.spec.scheduled.instance.model.GlobalEventJobInstance> globalEventJobInstanceMap,
                                                                                                                           java.util.Map<java.lang.String,​org.ikasan.spec.scheduled.instance.model.InternalEventDrivenJobInstance> internalEventDrivenJobs,
                                                                                                                           java.util.List<org.ikasan.spec.scheduled.instance.model.ContextParameterInstance> contextParameters,
                                                                                                                           org.ikasan.spec.scheduled.instance.model.ContextInstance parentContextInstance,
                                                                                                                           org.apache.commons.lang3.mutable.MutableBoolean lockRaised,
                                                                                                                           boolean markAsRaised)
        The method is responsible for determining if any job initiation events can be raised based on the receipt of a ContextualisedScheduledProcessEvent. It delegates to methods to assess the logic associated with the job dependencies.
        Parameters:
        scheduledProcessEvent -
        contextInstance -
        dryRunParameters -
        globalEventJobInstanceMap -
        internalEventDrivenJobs -
        contextParameters -
        parentContextInstance -
        lockRaised -
        markAsRaised -
        Returns:
      • addQueuedSchedulerJobInitiationEvent

        protected void addQueuedSchedulerJobInitiationEvent​(org.ikasan.spec.scheduled.instance.model.ContextInstance contextInstance,
                                                            org.ikasan.spec.scheduled.instance.model.ContextInstance parentContextInstance,
                                                            java.lang.String jobIdentifier,
                                                            org.ikasan.spec.scheduled.event.model.SchedulerJobInitiationEvent event)
      • addSchedulerJobStateChangeEventListener

        public void addSchedulerJobStateChangeEventListener​(org.ikasan.spec.scheduled.core.listener.SchedulerJobInstanceStateChangeEventListener listener)
        Add a SchedulerJobInstanceStateChangeEventListener.
        Parameters:
        listener -
      • removeSchedulerJobStateChangeEventListener

        public void removeSchedulerJobStateChangeEventListener​(org.ikasan.spec.scheduled.core.listener.SchedulerJobInstanceStateChangeEventListener listener)
        Remove a SchedulerJobInstanceStateChangeEventListener.
        Parameters:
        listener -
      • issueSchedulerJobStateChangeEvent

        protected void issueSchedulerJobStateChangeEvent​(org.ikasan.job.orchestration.model.event.SchedulerJobInstanceStateChangeEventImpl event)
        Issue a SchedulerJobInstanceStateChangeEvent to all registered listeners.
        Parameters:
        event -