public class DefaultAsyncJobExecutor extends AbstractAsyncExecutor
| Modifier and Type | Field and Description |
|---|---|
protected Thread |
asyncJobAcquisitionThread
Thread responsible for async job acquisition.
|
protected boolean |
isAsyncJobAcquisitionEnabled
If true (default), the thread for acquiring async jobs will be started.
|
protected boolean |
isResetExpiredJobEnabled
If true (default), the thread for acquiring expired jobs will be started.
|
protected boolean |
isTimerJobAcquisitionEnabled
If true (default), the thread for acquiring timer jobs will be started.
|
protected Thread |
resetExpiredJobThread
Thread responsible for resetting the expired jobs.
|
protected boolean |
shutdownTaskExecutor |
protected AsyncTaskExecutor |
taskExecutor
The async task executor used for job execution.
|
protected Thread |
timerJobAcquisitionThread
Thread responsible for timer job acquisition.
|
protected boolean |
unlockOwnedJobs
Whether to unlock jobs that are owned by this executor (have the same
lockOwner) at startup or shutdown.
|
acquireRunnableThreadName, asyncJobLockTimeInMillis, asyncJobsDueRunnable, asyncRunnableExecutionExceptionHandler, defaultAsyncJobAcquireWaitTimeInMillis, defaultQueueSizeFullWaitTime, defaultTimerJobAcquireWaitTimeInMillis, executeAsyncRunnableFactory, isActive, isAutoActivate, isMessageQueueMode, jobEntityManager, jobServiceConfiguration, lockOwner, maxAsyncJobsDuePerAcquisition, maxTimerJobsPerAcquisition, resetExpiredJobsInterval, resetExpiredJobsPageSize, resetExpiredJobsRunnable, resetExpiredRunnableName, retryWaitTimeInMillis, temporaryJobQueue, timerJobRunnable, timerLockTimeInMillis, timerRunnableNeeded| Constructor and Description |
|---|
DefaultAsyncJobExecutor() |
| Modifier and Type | Method and Description |
|---|---|
protected ResetExpiredJobsRunnable |
createResetExpiredJobsRunnable(String resetRunnableName) |
protected boolean |
executeAsyncJob(JobInfo job,
Runnable runnable) |
Thread |
getAsyncJobAcquisitionThread() |
int |
getRemainingCapacity() |
Thread |
getResetExpiredJobThread() |
AsyncTaskExecutor |
getTaskExecutor()
The optional task executor for the async executor
|
Thread |
getTimerJobAcquisitionThread() |
protected void |
initAsyncJobExecutionThreadPool() |
boolean |
isAsyncJobAcquisitionEnabled() |
boolean |
isResetExpiredJobEnabled() |
boolean |
isTimerJobAcquisitionEnabled() |
boolean |
isUnlockOwnedJobs() |
void |
setAsyncJobAcquisitionEnabled(boolean isAsyncJobAcquisitionEnabled) |
void |
setAsyncJobAcquisitionThread(Thread asyncJobAcquisitionThread) |
void |
setResetExpiredJobEnabled(boolean isResetExpiredJobEnabled) |
void |
setResetExpiredJobThread(Thread resetExpiredJobThread) |
void |
setTaskExecutor(AsyncTaskExecutor taskExecutor)
Set the task executor for this async executor.
|
void |
setTimerJobAcquisitionEnabled(boolean isTimerJobAcquisitionEnabled) |
void |
setTimerJobAcquisitionThread(Thread timerJobAcquisitionThread) |
void |
setUnlockOwnedJobs(boolean unlockOwnedJobs) |
protected void |
shutdownAdditionalComponents() |
protected void |
startAdditionalComponents() |
protected void |
startJobAcquisitionThread()
Starts the acquisition thread
|
protected void |
startResetExpiredJobsThread()
Starts the reset expired jobs thread
|
protected void |
startTimerAcquisitionThread() |
protected void |
stopExecutingAsyncJobs() |
protected void |
stopJobAcquisitionThread()
Stops the acquisition thread
|
protected void |
stopResetExpiredJobsThread()
Stops the reset expired jobs thread
|
protected void |
stopTimerAcquisitionThread() |
protected void |
unacquireJobAfterRejection(JobInfo job) |
createRunnableForJob, executeAsyncJob, executeTemporaryJobs, getAsyncJobLockTimeInMillis, getAsyncJobsDueRunnable, getAsyncRunnableExecutionExceptionHandler, getDefaultAsyncJobAcquireWaitTimeInMillis, getDefaultQueueSizeFullWaitTimeInMillis, getDefaultTimerJobAcquireWaitTimeInMillis, getExecuteAsyncRunnableFactory, getJobServiceConfiguration, getLockOwner, getMaxAsyncJobsDuePerAcquisition, getMaxTimerJobsPerAcquisition, getResetExpiredJobsInterval, getResetExpiredJobsPageSize, getResetExpiredJobsRunnable, getRetryWaitTimeInMillis, getTimerJobRunnable, getTimerLockTimeInMillis, initializeJobEntityManager, initializeRunnables, isActive, isAutoActivate, isMessageQueueMode, setAcquireRunnableThreadName, setAsyncJobLockTimeInMillis, setAsyncJobsDueRunnable, setAsyncRunnableExecutionExceptionHandler, setAutoActivate, setDefaultAsyncJobAcquireWaitTimeInMillis, setDefaultQueueSizeFullWaitTimeInMillis, setDefaultTimerJobAcquireWaitTimeInMillis, setExecuteAsyncRunnableFactory, setJobEntityManager, setJobServiceConfiguration, setLockOwner, setMaxAsyncJobsDuePerAcquisition, setMaxTimerJobsPerAcquisition, setMessageQueueMode, setResetExpiredJobsInterval, setResetExpiredJobsPageSize, setResetExpiredJobsRunnable, setResetExpiredRunnableName, setRetryWaitTimeInMillis, setTenantId, setTimerJobRunnable, setTimerLockTimeInMillis, setTimerRunnableNeeded, shutdown, start, stopRunnables, unlockOwnedJobsprotected boolean isAsyncJobAcquisitionEnabled
protected boolean isTimerJobAcquisitionEnabled
protected boolean isResetExpiredJobEnabled
protected Thread asyncJobAcquisitionThread
protected Thread timerJobAcquisitionThread
protected Thread resetExpiredJobThread
protected boolean unlockOwnedJobs
protected AsyncTaskExecutor taskExecutor
protected boolean shutdownTaskExecutor
protected boolean executeAsyncJob(JobInfo job, Runnable runnable)
executeAsyncJob in class AbstractAsyncExecutorprotected void unacquireJobAfterRejection(JobInfo job)
protected void startAdditionalComponents()
startAdditionalComponents in class AbstractAsyncExecutorprotected void shutdownAdditionalComponents()
shutdownAdditionalComponents in class AbstractAsyncExecutorprotected ResetExpiredJobsRunnable createResetExpiredJobsRunnable(String resetRunnableName)
createResetExpiredJobsRunnable in class AbstractAsyncExecutorprotected void initAsyncJobExecutionThreadPool()
protected void stopExecutingAsyncJobs()
protected void startJobAcquisitionThread()
protected void startTimerAcquisitionThread()
protected void stopJobAcquisitionThread()
protected void stopTimerAcquisitionThread()
protected void startResetExpiredJobsThread()
protected void stopResetExpiredJobsThread()
public boolean isAsyncJobAcquisitionEnabled()
public void setAsyncJobAcquisitionEnabled(boolean isAsyncJobAcquisitionEnabled)
public boolean isTimerJobAcquisitionEnabled()
public void setTimerJobAcquisitionEnabled(boolean isTimerJobAcquisitionEnabled)
public boolean isResetExpiredJobEnabled()
public void setResetExpiredJobEnabled(boolean isResetExpiredJobEnabled)
public Thread getTimerJobAcquisitionThread()
public void setTimerJobAcquisitionThread(Thread timerJobAcquisitionThread)
public Thread getAsyncJobAcquisitionThread()
public void setAsyncJobAcquisitionThread(Thread asyncJobAcquisitionThread)
public Thread getResetExpiredJobThread()
public void setResetExpiredJobThread(Thread resetExpiredJobThread)
public int getRemainingCapacity()
public boolean isUnlockOwnedJobs()
public void setUnlockOwnedJobs(boolean unlockOwnedJobs)
public AsyncTaskExecutor getTaskExecutor()
AsyncExecutorpublic void setTaskExecutor(AsyncTaskExecutor taskExecutor)
AsyncExecutorCopyright © 2020 Flowable. All rights reserved.