public class DefaultJobExecutor extends ThreadPoolJobExecutor
This is a simple implementation of the JobExecutor using self-managed
threads for performing background work.
This implementation uses a ThreadPoolExecutor backed by a queue to which
work is submitted.
NOTE: use this class in environments in which self-management of threads is permitted. Consider using a different thread-management strategy in J(2)EE-Environments.
| Modifier and Type | Field and Description |
|---|---|
protected int |
corePoolSize |
protected int |
maxPoolSize |
protected int |
queueSize |
threadPoolExecutoracquireJobsCmdFactory, acquireJobsRunnable, backoffDecreaseThreshold, backoffTimeInMillis, isActive, isAutoActivate, jobAcquisitionThread, lockOwner, lockTimeInMillis, maxBackoff, maxJobsPerAcquisition, maxWait, name, processEngines, rejectedJobsHandler, waitIncreaseFactor, waitTimeInMillis| Constructor and Description |
|---|
DefaultJobExecutor() |
| Modifier and Type | Method and Description |
|---|---|
int |
getCorePoolSize() |
int |
getMaxPoolSize() |
int |
getQueueSize() |
void |
setCorePoolSize(int corePoolSize) |
void |
setMaxPoolSize(int maxPoolSize) |
void |
setQueueSize(int queueSize) |
protected void |
startExecutingJobs() |
protected void |
stopExecutingJobs() |
executeJobs, getThreadPoolExecutor, setThreadPoolExecutorengineIterator, ensureCleanup, ensureInitialization, executeJobs, getAcquireJobsCmd, getAcquireJobsCmdFactory, getAcquireJobsRunnable, getBackoffDecreaseThreshold, getBackoffTimeInMillis, getCommandExecutor, getExecuteJobsRunnable, getLockOwner, getLockTimeInMillis, getMaxBackoff, getMaxJobsPerAcquisition, getMaxWait, getName, getProcessEngines, getRejectedJobsHandler, getWaitIncreaseFactor, getWaitTimeInMillis, hasRegisteredEngine, isActive, isAutoActivate, jobWasAdded, logAcquiredJobs, logAcquisitionAttempt, logAcquisitionFailureJobs, logRejectedExecution, registerProcessEngine, setAcquireJobsCmdFactory, setAutoActivate, setBackoffDecreaseThreshold, setBackoffTimeInMillis, setCommandExecutor, setLockOwner, setLockTimeInMillis, setMaxBackoff, setMaxJobsPerAcquisition, setMaxWait, setProcessEngines, setRejectedJobsHandler, setWaitIncreaseFactor, setWaitTimeInMillis, shutdown, start, startJobAcquisitionThread, stopJobAcquisitionThread, unregisterProcessEngineprotected int queueSize
protected int corePoolSize
protected int maxPoolSize
protected void startExecutingJobs()
startExecutingJobs in class ThreadPoolJobExecutorprotected void stopExecutingJobs()
stopExecutingJobs in class ThreadPoolJobExecutorpublic int getQueueSize()
public void setQueueSize(int queueSize)
public int getCorePoolSize()
public void setCorePoolSize(int corePoolSize)
public int getMaxPoolSize()
public void setMaxPoolSize(int maxPoolSize)
Copyright © 2021. All rights reserved.