public class ResetExpiredJobsRunnable extends Object implements Runnable
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.| Modifier and Type | Field and Description |
|---|---|
protected AsyncExecutor |
asyncExecutor |
protected boolean |
isInterrupted |
protected AtomicBoolean |
isWaiting |
protected Collection<JobInfoEntityManager<? extends JobInfoEntity>> |
jobInfoEntityManagers |
protected Object |
MONITOR |
protected String |
name |
| Constructor and Description |
|---|
ResetExpiredJobsRunnable(String name,
AsyncExecutor asyncExecutor,
JobInfoEntityManager<? extends JobInfoEntity>... jobEntityManagers) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getEngineName() |
boolean |
isInterrupted() |
void |
resetJobs()
Resets jobs that were expired.
|
protected void |
resetJobs(JobInfoEntityManager<? extends JobInfoEntity> jobEntityManager) |
void |
run() |
void |
setInterrupted(boolean interrupted) |
void |
stop() |
protected final String name
protected final AsyncExecutor asyncExecutor
protected final Collection<JobInfoEntityManager<? extends JobInfoEntity>> jobInfoEntityManagers
protected volatile boolean isInterrupted
protected final Object MONITOR
protected final AtomicBoolean isWaiting
public ResetExpiredJobsRunnable(String name, AsyncExecutor asyncExecutor, JobInfoEntityManager<? extends JobInfoEntity>... jobEntityManagers)
public void resetJobs()
protected void resetJobs(JobInfoEntityManager<? extends JobInfoEntity> jobEntityManager)
public void stop()
protected String getEngineName()
public boolean isInterrupted()
public void setInterrupted(boolean interrupted)
Copyright © 2021 Flowable. All rights reserved.