Class SequentialJobAcquisitionRunnable
java.lang.Object
org.camunda.bpm.engine.impl.jobexecutor.AcquireJobsRunnable
org.camunda.bpm.engine.impl.jobexecutor.SequentialJobAcquisitionRunnable
- All Implemented Interfaces:
Runnable
AcquireJobsRunnable
able to serve multiple process engines.
Continuously acquires jobs for all registered process engines until interruption. For every such acquisition cycle, jobs are acquired and submitted for execution.
For one cycle, all acquisition-related events (acquired jobs by engine, rejected jobs by engine,
exceptions during acquisition, etc.) are collected in an instance of JobAcquisitionContext
.
The context is then handed to a JobAcquisitionStrategy
that
determines the there is before the next acquisition cycles begins and how many jobs
are to be acquired next.
- Author:
- Daniel Meyer
-
Field Summary
Modifier and TypeFieldDescriptionprotected JobAcquisitionContext
protected final JobExecutorLogger
Fields inherited from class org.camunda.bpm.engine.impl.jobexecutor.AcquireJobsRunnable
isInterrupted, isJobAdded, isWaiting, jobExecutor, MONITOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected AcquiredJobs
acquireJobs
(JobAcquisitionContext context, JobAcquisitionStrategy acquisitionStrategy, ProcessEngineImpl currentProcessEngine) protected void
configureNextAcquisitionCycle
(JobAcquisitionContext acquisitionContext, JobAcquisitionStrategy acquisitionStrategy) Reconfigure the acquisition strategy based on the current cycle's acquisition context.protected void
executeJobs
(JobAcquisitionContext context, ProcessEngineImpl currentProcessEngine, AcquiredJobs acquiredJobs) protected JobAcquisitionContext
protected JobAcquisitionStrategy
void
run()
Methods inherited from class org.camunda.bpm.engine.impl.jobexecutor.AcquireJobsRunnable
clearJobAddedNotification, isJobAdded, jobWasAdded, stop, suspendAcquisition
-
Field Details
-
LOG
-
acquisitionContext
-
-
Constructor Details
-
SequentialJobAcquisitionRunnable
-
-
Method Details
-
run
public void run() -
initializeAcquisitionContext
-
configureNextAcquisitionCycle
protected void configureNextAcquisitionCycle(JobAcquisitionContext acquisitionContext, JobAcquisitionStrategy acquisitionStrategy) Reconfigure the acquisition strategy based on the current cycle's acquisition context. A strategy implementation may update internal data structure to calculate a different wait time before the next cycle of acquisition is performed. -
initializeAcquisitionStrategy
-
getAcquisitionContext
-
executeJobs
protected void executeJobs(JobAcquisitionContext context, ProcessEngineImpl currentProcessEngine, AcquiredJobs acquiredJobs) -
acquireJobs
protected AcquiredJobs acquireJobs(JobAcquisitionContext context, JobAcquisitionStrategy acquisitionStrategy, ProcessEngineImpl currentProcessEngine)
-