public abstract class JobExecutor extends Object
Interface to the work management component of activiti.
This component is responsible for performing all background work
(Jobs) scheduled by activiti.
You should generally only have one of these per Activiti instance (process engine) in a JVM. In clustered situations, you can have multiple of these running against the same queue + pending job list.
| Modifier and Type | Field and Description |
|---|---|
protected Command<AcquiredJobs> |
acquireJobsCmd |
protected AcquireJobsRunnable |
acquireJobsRunnable |
protected ClockReader |
clockReader |
protected CommandExecutor |
commandExecutor |
protected boolean |
isActive |
protected boolean |
isAutoActivate |
protected Thread |
jobAcquisitionThread |
protected String |
lockOwner |
protected int |
lockTimeInMillis |
protected int |
maxJobsPerAcquisition
To avoid deadlocks, the default for this is one.
|
protected String |
name |
protected RejectedJobsHandler |
rejectedJobsHandler |
protected int |
waitTimeInMillis |
| Constructor and Description |
|---|
JobExecutor() |
protected String name
protected CommandExecutor commandExecutor
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
protected ClockReader clockReader
public void start()
public void shutdown()
protected void ensureInitialization()
protected void ensureCleanup()
public void jobWasAdded()
protected abstract void startExecutingJobs()
protected abstract void stopExecutingJobs()
public CommandExecutor getCommandExecutor()
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 setCommandExecutor(CommandExecutor commandExecutor)
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 Date getCurrentTime()
public void setClockReader(ClockReader clockReader)
Copyright © 2014 Alfresco. All rights reserved.