public class DefaultAsyncJobExecutor extends AbstractAsyncExecutor
| Modifier and Type | Field and Description |
|---|---|
protected Thread |
asyncJobAcquisitionThread |
protected int |
corePoolSize
The minimal number of threads that are kept alive in the threadpool for job execution
|
protected ExecutorService |
executorService
The executor service used for job execution
|
protected long |
keepAliveTime
The time (in milliseconds) a thread used for job execution must be kept alive before it is destroyed.
|
protected int |
maxPoolSize
The maximum number of threads that are kept alive in the threadpool for job execution
|
protected int |
queueSize
The size of the queue on which jobs to be executed are placed
|
protected Thread |
resetExpiredJobThread |
protected long |
secondsToWaitOnShutdown
The time (in seconds) that is waited to gracefully shut down the threadpool used for job execution
|
protected BlockingQueue<Runnable> |
threadPoolQueue
The queue used for job execution work
|
protected Thread |
timerJobAcquisitionThread |
protected boolean |
unlockOwnedJobs
Whether to unlock jobs that are owned by this executor (have the same lockOwner) at startup
|
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() |
createRunnableForJob, executeAsyncJob, executeTemporaryJobs, getAsyncJobLockTimeInMillis, getAsyncRunnableExecutionExceptionHandler, getDefaultAsyncJobAcquireWaitTimeInMillis, getDefaultQueueSizeFullWaitTimeInMillis, getDefaultTimerJobAcquireWaitTimeInMillis, getExecuteAsyncRunnableFactory, getJobServiceConfiguration, getLockOwner, getMaxAsyncJobsDuePerAcquisition, getMaxTimerJobsPerAcquisition, getResetExpiredJobsInterval, getResetExpiredJobsPageSize, getRetryWaitTimeInMillis, 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, setTimerJobRunnable, setTimerLockTimeInMillis, setTimerRunnableNeeded, shutdown, start, stopRunnables, unlockOwnedJobsprotected Thread timerJobAcquisitionThread
protected Thread asyncJobAcquisitionThread
protected Thread resetExpiredJobThread
protected int corePoolSize
protected int maxPoolSize
protected long keepAliveTime
protected int queueSize
protected boolean unlockOwnedJobs
protected BlockingQueue<Runnable> threadPoolQueue
protected ExecutorService executorService
protected long secondsToWaitOnShutdown
protected boolean executeAsyncJob(JobInfo job, Runnable runnable)
executeAsyncJob in class AbstractAsyncExecutorprotected void startAdditionalComponents()
startAdditionalComponents in class AbstractAsyncExecutorprotected void shutdownAdditionalComponents()
shutdownAdditionalComponents 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 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 getQueueSize()
public int getRemainingCapacity()
public void setQueueSize(int queueSize)
public int getCorePoolSize()
public void setCorePoolSize(int corePoolSize)
public int getMaxPoolSize()
public void setMaxPoolSize(int maxPoolSize)
public long getKeepAliveTime()
public void setKeepAliveTime(long keepAliveTime)
public long getSecondsToWaitOnShutdown()
public void setSecondsToWaitOnShutdown(long secondsToWaitOnShutdown)
public boolean isUnlockOwnedJobs()
public void setUnlockOwnedJobs(boolean unlockOwnedJobs)
public BlockingQueue<Runnable> getThreadPoolQueue()
public void setThreadPoolQueue(BlockingQueue<Runnable> threadPoolQueue)
public ExecutorService getExecutorService()
public void setExecutorService(ExecutorService executorService)
Copyright © 2017 Flowable. All rights reserved.