Class ResetExpiredJobsRunnable

  • All Implemented Interfaces:
    Runnable
    Direct Known Subclasses:
    TenantAwareResetExpiredJobsRunnable

    public class ResetExpiredJobsRunnable
    extends Object
    implements Runnable
    Runnable that checks the Job entities periodically for 'expired' jobs. When a job is executed, it is first locked (lock owner and lock time is set). A job is expired when this lock time is exceeded (this can for example happen when an executor goes down before completing a task) This runnable will find such jobs and reset them, so they can be picked up again.
    Author:
    Joram Barrez
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable
      • resetJobs

        public void resetJobs()
        Resets jobs that were expired. Will continue to reset jobs until no more jobs are returned.
      • stop

        public void stop()
      • getEngineName

        protected String getEngineName()
      • isInterrupted

        public boolean isInterrupted()
      • setInterrupted

        public void setInterrupted​(boolean interrupted)