public abstract class JobExecutor extends Object
Interface to the component responsible for performing
background work (Jobs
).
The JobExecutor
is capable of dispatching to multiple process engines,
ie. multiple process engines can share a single Thread Pool for performing Background
Work.
In clustered situations, you can have multiple Job Executors running against the same queue + pending job list.
Modifier and Type | Field and Description |
---|---|
protected Command<AcquiredJobs> |
acquireJobsCmd |
protected AcquireJobsRunnable |
acquireJobsRunnable |
protected boolean |
isActive |
protected boolean |
isAutoActivate |
protected Thread |
jobAcquisitionThread |
protected String |
lockOwner |
protected int |
lockTimeInMillis |
protected int |
maxJobsPerAcquisition |
protected String |
name |
protected List<ProcessEngineImpl> |
processEngines |
protected RejectedJobsHandler |
rejectedJobsHandler |
protected int |
waitTimeInMillis |
Constructor and Description |
---|
JobExecutor() |
protected String name
protected List<ProcessEngineImpl> processEngines
protected Command<AcquiredJobs> acquireJobsCmd
protected AcquireJobsRunnable acquireJobsRunnable
protected RejectedJobsHandler rejectedJobsHandler
protected Thread jobAcquisitionThread
protected boolean isAutoActivate
protected boolean isActive
protected int maxJobsPerAcquisition
protected int waitTimeInMillis
protected String lockOwner
protected int lockTimeInMillis
public void start()
public void shutdown()
protected void ensureInitialization()
protected void ensureCleanup()
public void jobWasAdded()
public void registerProcessEngine(ProcessEngineImpl processEngine)
public void unregisterProcessEngine(ProcessEngineImpl processEngine)
protected abstract void startExecutingJobs()
protected abstract void stopExecutingJobs()
public abstract void executeJobs(List<String> jobIds, ProcessEngineImpl processEngine)
@Deprecated public void executeJobs(List<String> jobIds)
executeJobs(List, ProcessEngineImpl)
insteadjobIds
- public List<ProcessEngineImpl> getProcessEngines()
@Deprecated public CommandExecutor getCommandExecutor()
getProcessEngines()
instead@Deprecated public void setCommandExecutor(CommandExecutor commandExecutorTxRequired)
registerProcessEngine(ProcessEngineImpl)
insteadcommandExecutorTxRequired
- public int getWaitTimeInMillis()
public void setWaitTimeInMillis(int waitTimeInMillis)
public int getLockTimeInMillis()
public void setLockTimeInMillis(int lockTimeInMillis)
public String getLockOwner()
public void setLockOwner(String lockOwner)
public boolean isAutoActivate()
public void setProcessEngines(List<ProcessEngineImpl> processEngines)
public void setAutoActivate(boolean isAutoActivate)
public int getMaxJobsPerAcquisition()
public void setMaxJobsPerAcquisition(int maxJobsPerAcquisition)
public String getName()
public Command<AcquiredJobs> getAcquireJobsCmd()
public void setAcquireJobsCmd(Command<AcquiredJobs> acquireJobsCmd)
public boolean isActive()
public RejectedJobsHandler getRejectedJobsHandler()
public void setRejectedJobsHandler(RejectedJobsHandler rejectedJobsHandler)
protected void startJobAcquisitionThread()
protected void stopJobAcquisitionThread()
public AcquireJobsRunnable getAcquireJobsRunnable()
Copyright © 2018. All rights reserved.