Class JobManager

  • All Implemented Interfaces:
    Session

    public class JobManager
    extends AbstractManager
    Author:
    Tom Baeyens, Daniel Meyer
    • Constructor Detail

      • JobManager

        public JobManager()
    • Method Detail

      • updateJob

        public void updateJob​(JobEntity job)
      • insertJob

        public void insertJob​(JobEntity job)
      • deleteJob

        public void deleteJob​(JobEntity job)
      • deleteJob

        public void deleteJob​(JobEntity job,
                              boolean fireDeleteEvent)
      • insertAndHintJobExecutor

        public void insertAndHintJobExecutor​(JobEntity jobEntity)
      • schedule

        public void schedule​(TimerEntity timer)
      • reschedule

        public void reschedule​(JobEntity jobEntity,
                               Date newDuedate)
      • hintJobExecutor

        protected void hintJobExecutor​(JobEntity job)
      • areInSameProcessInstance

        protected boolean areInSameProcessInstance​(JobEntity job1,
                                                   JobEntity job2)
      • isJobPriorityInJobExecutorPriorityRange

        protected boolean isJobPriorityInJobExecutorPriorityRange​(long jobPriority)
      • findJobsByProcessInstanceId

        public List<JobEntity> findJobsByProcessInstanceId​(String processInstanceId)
      • findJobsByJobDefinitionId

        public List<JobEntity> findJobsByJobDefinitionId​(String jobDefinitionId)
      • findJobsByHandlerType

        public List<Job> findJobsByHandlerType​(String handlerType)
      • findJobCountByQueryCriteria

        public long findJobCountByQueryCriteria​(JobQueryImpl jobQuery)
      • updateJobSuspensionStateById

        public void updateJobSuspensionStateById​(String jobId,
                                                 SuspensionState suspensionState)
      • updateJobSuspensionStateByJobDefinitionId

        public void updateJobSuspensionStateByJobDefinitionId​(String jobDefinitionId,
                                                              SuspensionState suspensionState)
      • updateJobSuspensionStateByProcessInstanceId

        public void updateJobSuspensionStateByProcessInstanceId​(String processInstanceId,
                                                                SuspensionState suspensionState)
      • updateJobSuspensionStateByProcessDefinitionId

        public void updateJobSuspensionStateByProcessDefinitionId​(String processDefinitionId,
                                                                  SuspensionState suspensionState)
      • updateStartTimerJobSuspensionStateByProcessDefinitionId

        public void updateStartTimerJobSuspensionStateByProcessDefinitionId​(String processDefinitionId,
                                                                            SuspensionState suspensionState)
      • updateJobSuspensionStateByProcessDefinitionKey

        public void updateJobSuspensionStateByProcessDefinitionKey​(String processDefinitionKey,
                                                                   SuspensionState suspensionState)
      • updateJobSuspensionStateByProcessDefinitionKeyAndTenantId

        public void updateJobSuspensionStateByProcessDefinitionKeyAndTenantId​(String processDefinitionKey,
                                                                              String processDefinitionTenantId,
                                                                              SuspensionState suspensionState)
      • updateStartTimerJobSuspensionStateByProcessDefinitionKey

        public void updateStartTimerJobSuspensionStateByProcessDefinitionKey​(String processDefinitionKey,
                                                                             SuspensionState suspensionState)
      • updateStartTimerJobSuspensionStateByProcessDefinitionKeyAndTenantId

        public void updateStartTimerJobSuspensionStateByProcessDefinitionKeyAndTenantId​(String processDefinitionKey,
                                                                                        String processDefinitionTenantId,
                                                                                        SuspensionState suspensionState)
      • updateFailedJobRetriesByJobDefinitionId

        public void updateFailedJobRetriesByJobDefinitionId​(String jobDefinitionId,
                                                            int retries,
                                                            Date dueDate,
                                                            boolean isDueDateSet)
      • updateJobPriorityByDefinitionId

        public void updateJobPriorityByDefinitionId​(String jobDefinitionId,
                                                    long priority)
      • configureQuery

        protected void configureQuery​(JobQueryImpl query)
      • isEnsureJobDueDateNotNull

        protected boolean isEnsureJobDueDateNotNull()
      • isJobDue

        protected boolean isJobDue​(JobEntity job)
        Sometimes we get a notification of a job that is not yet due, so we should not execute it immediately