public class DefaultAsyncJobExecutor extends AbstractAsyncExecutor
AbstractAsyncExecutor.AcquireAsyncJobsDueRunnableConfiguration, AbstractAsyncExecutor.AcquireTimerRunnableConfiguration| Modifier and Type | Field and Description |
|---|---|
protected Thread |
asyncJobAcquisitionThread
Thread responsible for async job acquisition.
|
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.
|
asyncJobsDueLifecycleListener, asyncJobsDueRunnable, asyncRunnableExecutionExceptionHandler, configuration, executeAsyncRunnableFactory, isActive, isAutoActivate, isMessageQueueMode, jobEntityManager, jobServiceConfiguration, resetExpiredJobsRunnable, temporaryJobQueue, timerJobRunnable, timerLifecycleListener| Constructor and Description |
|---|
DefaultAsyncJobExecutor() |
DefaultAsyncJobExecutor(AsyncJobExecutorConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
protected ResetExpiredJobsRunnable |
createResetExpiredJobsRunnable(String resetRunnableName) |
protected boolean |
executeAsyncJob(JobInfo job,
Runnable runnable) |
Thread |
getAsyncJobAcquisitionThread() |
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() |
protected void |
sendRejectedEvent(JobInfo job) |
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, getAsyncJobsDueLifecycleListener, getAsyncJobsDueRunnable, getAsyncJobsGlobalLockPollRate, getAsyncJobsGlobalLockWaitTime, getAsyncRunnableExecutionExceptionHandler, getConfiguration, getDefaultAsyncJobAcquireWaitTimeInMillis, getDefaultQueueSizeFullWaitTimeInMillis, getDefaultTimerJobAcquireWaitTimeInMillis, getExecuteAsyncRunnableFactory, getGlobalAcquireLockPrefix, getJobServiceConfiguration, getLockOwner, getMaxAsyncJobsDuePerAcquisition, getMaxTimerJobsPerAcquisition, getMoveTimerExecutorPoolSize, getResetExpiredJobsInterval, getResetExpiredJobsPageSize, getResetExpiredJobsRunnable, getRetryWaitTimeInMillis, getTenantId, getTimerJobRunnable, getTimerLifecycleListener, getTimerLockPollRate, getTimerLockTimeInMillis, getTimerLockWaitTime, initializeJobEntityManager, initializeRunnables, isActive, isAutoActivate, isGlobalAcquireLockEnabled, isMessageQueueMode, isTimerRunnableNeeded, setAcquireRunnableThreadName, setAsyncJobLockTimeInMillis, setAsyncJobsDueLifecycleListener, setAsyncJobsDueRunnable, setAsyncJobsGlobalLockPollRate, setAsyncJobsGlobalLockWaitTime, setAsyncRunnableExecutionExceptionHandler, setAutoActivate, setConfiguration, setDefaultAsyncJobAcquireWaitTimeInMillis, setDefaultQueueSizeFullWaitTimeInMillis, setDefaultTimerJobAcquireWaitTimeInMillis, setExecuteAsyncRunnableFactory, setGlobalAcquireLockEnabled, setGlobalAcquireLockPrefix, setJobEntityManager, setJobServiceConfiguration, setLockOwner, setMaxAsyncJobsDuePerAcquisition, setMaxTimerJobsPerAcquisition, setMessageQueueMode, setMoveTimerExecutorPoolSize, setResetExpiredJobsInterval, setResetExpiredJobsPageSize, setResetExpiredJobsRunnable, setResetExpiredRunnableName, setRetryWaitTimeInMillis, setTenantId, setTimerJobRunnable, setTimerLifecycleListener, setTimerLockPollRate, setTimerLockTimeInMillis, setTimerLockWaitTime, setTimerRunnableNeeded, shutdown, start, stopRunnables, unlockOwnedJobsprotected Thread asyncJobAcquisitionThread
protected Thread timerJobAcquisitionThread
protected Thread resetExpiredJobThread
protected AsyncTaskExecutor taskExecutor
protected boolean shutdownTaskExecutor
public DefaultAsyncJobExecutor()
public DefaultAsyncJobExecutor(AsyncJobExecutorConfiguration configuration)
protected boolean executeAsyncJob(JobInfo job, Runnable runnable)
executeAsyncJob in class AbstractAsyncExecutorprotected void sendRejectedEvent(JobInfo job)
protected 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 boolean isUnlockOwnedJobs()
public void setUnlockOwnedJobs(boolean unlockOwnedJobs)
public AsyncTaskExecutor getTaskExecutor()
AsyncExecutorpublic void setTaskExecutor(AsyncTaskExecutor taskExecutor)
AsyncExecutorCopyright © 2021 Flowable. All rights reserved.