Class JobAcquisitionContext
- java.lang.Object
-
- org.camunda.bpm.engine.impl.jobexecutor.JobAcquisitionContext
-
public class JobAcquisitionContext extends java.lang.Object
- Author:
- Thorben Lindhauer
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,AcquiredJobs>
acquiredJobsByEngine
protected java.lang.Exception
acquisitionException
protected long
acquisitionTime
protected java.util.Map<java.lang.String,java.util.List<java.util.List<java.lang.String>>>
additionalJobBatchesByEngine
protected boolean
isJobAdded
protected java.util.Map<java.lang.String,java.util.List<java.util.List<java.lang.String>>>
rejectedJobBatchesByEngine
-
Constructor Summary
Constructors Constructor Description JobAcquisitionContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areAllEnginesIdle()
java.util.Map<java.lang.String,AcquiredJobs>
getAcquiredJobsByEngine()
Jobs that were acquired in the current acquisition cycle.java.lang.Exception
getAcquisitionException()
long
getAcquisitionTime()
java.util.Map<java.lang.String,java.util.List<java.util.List<java.lang.String>>>
getAdditionalJobsByEngine()
Jobs that have been acquired in previous cycles and are supposed to be re-submitted for executionjava.util.Map<java.lang.String,java.util.List<java.util.List<java.lang.String>>>
getRejectedJobsByEngine()
Jobs that were rejected from execution in the acquisition cycle due to lacking execution resources.boolean
hasJobAcquisitionLockFailureOccurred()
true if at least one job could not be locked, regardless of engineboolean
isJobAdded()
void
reset()
void
setAcquisitionException(java.lang.Exception e)
void
setAcquisitionTime(long acquisitionTime)
void
setJobAdded(boolean isJobAdded)
void
submitAcquiredJobs(java.lang.String engineName, AcquiredJobs acquiredJobs)
void
submitAdditionalJobBatch(java.lang.String engineName, java.util.List<java.lang.String> jobIds)
void
submitRejectedBatch(java.lang.String engineName, java.util.List<java.lang.String> jobIds)
-
-
-
Field Detail
-
rejectedJobBatchesByEngine
protected java.util.Map<java.lang.String,java.util.List<java.util.List<java.lang.String>>> rejectedJobBatchesByEngine
-
acquiredJobsByEngine
protected java.util.Map<java.lang.String,AcquiredJobs> acquiredJobsByEngine
-
additionalJobBatchesByEngine
protected java.util.Map<java.lang.String,java.util.List<java.util.List<java.lang.String>>> additionalJobBatchesByEngine
-
acquisitionException
protected java.lang.Exception acquisitionException
-
acquisitionTime
protected long acquisitionTime
-
isJobAdded
protected boolean isJobAdded
-
-
Method Detail
-
submitRejectedBatch
public void submitRejectedBatch(java.lang.String engineName, java.util.List<java.lang.String> jobIds)
-
submitAcquiredJobs
public void submitAcquiredJobs(java.lang.String engineName, AcquiredJobs acquiredJobs)
-
submitAdditionalJobBatch
public void submitAdditionalJobBatch(java.lang.String engineName, java.util.List<java.lang.String> jobIds)
-
reset
public void reset()
-
areAllEnginesIdle
public boolean areAllEnginesIdle()
- Returns:
- true, if for all engines there were less jobs acquired than requested
-
hasJobAcquisitionLockFailureOccurred
public boolean hasJobAcquisitionLockFailureOccurred()
true if at least one job could not be locked, regardless of engine
-
setAcquisitionTime
public void setAcquisitionTime(long acquisitionTime)
-
getAcquisitionTime
public long getAcquisitionTime()
-
getAcquiredJobsByEngine
public java.util.Map<java.lang.String,AcquiredJobs> getAcquiredJobsByEngine()
Jobs that were acquired in the current acquisition cycle.- Returns:
-
getRejectedJobsByEngine
public java.util.Map<java.lang.String,java.util.List<java.util.List<java.lang.String>>> getRejectedJobsByEngine()
Jobs that were rejected from execution in the acquisition cycle due to lacking execution resources. With an execution thread pool, these jobs could not be submitted due to saturation of the underlying job queue.
-
getAdditionalJobsByEngine
public java.util.Map<java.lang.String,java.util.List<java.util.List<java.lang.String>>> getAdditionalJobsByEngine()
Jobs that have been acquired in previous cycles and are supposed to be re-submitted for execution
-
setAcquisitionException
public void setAcquisitionException(java.lang.Exception e)
-
getAcquisitionException
public java.lang.Exception getAcquisitionException()
-
setJobAdded
public void setJobAdded(boolean isJobAdded)
-
isJobAdded
public boolean isJobAdded()
-
-