public class DefaultAsyncJobExecutor extends AbstractAsyncJobExecutor
Modifier and Type | Field and Description |
---|---|
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 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 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
|
asyncJobAcquisitionThread, asyncJobLockTimeInMillis, asyncJobsDueRunnable, commandExecutor, defaultAsyncJobAcquireWaitTimeInMillis, defaultQueueSizeFullWaitTime, defaultTimerJobAcquireWaitTimeInMillis, executeAsyncRunnableFactory, isActive, isAutoActivate, keepAliveTime, lockOwner, maxAsyncJobsDuePerAcquisition, maxTimerJobsPerAcquisition, retryWaitTimeInMillis, temporaryJobQueue, timerJobAcquisitionThread, timerJobRunnable, timerLockTimeInMillis
Constructor and Description |
---|
DefaultAsyncJobExecutor() |
Modifier and Type | Method and Description |
---|---|
protected Runnable |
createRunnableForJob(JobEntity job) |
protected boolean |
executeAsyncJob(Runnable runnable) |
int |
getCorePoolSize() |
ExecutorService |
getExecutorService() |
int |
getMaxPoolSize() |
int |
getQueueSize() |
long |
getSecondsToWaitOnShutdown() |
BlockingQueue<Runnable> |
getThreadPoolQueue() |
void |
setCorePoolSize(int corePoolSize) |
void |
setExecutorService(ExecutorService executorService) |
void |
setMaxPoolSize(int maxPoolSize) |
void |
setQueueSize(int queueSize) |
void |
setSecondsToWaitOnShutdown(long secondsToWaitOnShutdown) |
void |
setThreadPoolQueue(BlockingQueue<Runnable> threadPoolQueue) |
protected void |
startExecutingAsyncJobs() |
protected void |
stopExecutingAsyncJobs() |
protected void |
unlockJob(JobEntity job,
CommandContext commandContext) |
doUnlockJob, executeAsyncJob, getAsyncJobLockTimeInMillis, getCommandExecutor, getDefaultAsyncJobAcquireWaitTimeInMillis, getDefaultQueueSizeFullWaitTimeInMillis, getDefaultTimerJobAcquireWaitTimeInMillis, getExecuteAsyncRunnableFactory, getKeepAliveTime, getLockOwner, getMaxAsyncJobsDuePerAcquisition, getMaxTimerJobsPerAcquisition, getRetryWaitTimeInMillis, getTimerLockTimeInMillis, initialize, isActive, isAutoActivate, setAsyncJobLockTimeInMillis, setAsyncJobsDueRunnable, setAutoActivate, setCommandExecutor, setDefaultAsyncJobAcquireWaitTimeInMillis, setDefaultQueueSizeFullWaitTimeInMillis, setDefaultTimerJobAcquireWaitTimeInMillis, setExecuteAsyncRunnableFactory, setKeepAliveTime, setLockOwner, setMaxAsyncJobsDuePerAcquisition, setMaxTimerJobsPerAcquisition, setRetryWaitTimeInMillis, setTimerJobRunnable, setTimerLockTimeInMillis, shutdown, start, startJobAcquisitionThread, stopJobAcquisitionThread
protected int corePoolSize
protected int maxPoolSize
protected int queueSize
protected BlockingQueue<Runnable> threadPoolQueue
protected ExecutorService executorService
protected long secondsToWaitOnShutdown
protected boolean executeAsyncJob(Runnable runnable)
executeAsyncJob
in class AbstractAsyncJobExecutor
protected Runnable createRunnableForJob(JobEntity job)
createRunnableForJob
in class AbstractAsyncJobExecutor
protected void unlockJob(JobEntity job, CommandContext commandContext)
unlockJob
in class AbstractAsyncJobExecutor
protected void startExecutingAsyncJobs()
startExecutingAsyncJobs
in class AbstractAsyncJobExecutor
protected void stopExecutingAsyncJobs()
stopExecutingAsyncJobs
in class AbstractAsyncJobExecutor
public int getQueueSize()
public void setQueueSize(int queueSize)
public int getCorePoolSize()
public void setCorePoolSize(int corePoolSize)
public int getMaxPoolSize()
public void setMaxPoolSize(int maxPoolSize)
public long getSecondsToWaitOnShutdown()
public void setSecondsToWaitOnShutdown(long secondsToWaitOnShutdown)
public BlockingQueue<Runnable> getThreadPoolQueue()
public void setThreadPoolQueue(BlockingQueue<Runnable> threadPoolQueue)
public ExecutorService getExecutorService()
public void setExecutorService(ExecutorService executorService)
Copyright © 2016 Alfresco. All rights reserved.