public class SequentialJobAcquisitionRunnable extends AcquireJobsRunnable
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.
Modifier and Type | Field and Description |
---|---|
protected JobAcquisitionContext |
acquisitionContext |
protected JobExecutorLogger |
LOG |
isInterrupted, isJobAdded, isWaiting, jobExecutor, MONITOR
Constructor and Description |
---|
SequentialJobAcquisitionRunnable(JobExecutor jobExecutor) |
Modifier and Type | Method and Description |
---|---|
protected 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) |
JobAcquisitionContext |
getAcquisitionContext() |
protected JobAcquisitionContext |
initializeAcquisitionContext() |
protected JobAcquisitionStrategy |
initializeAcquisitionStrategy() |
void |
run() |
clearJobAddedNotification, isJobAdded, jobWasAdded, stop, suspendAcquisition
protected final JobExecutorLogger LOG
protected JobAcquisitionContext acquisitionContext
public SequentialJobAcquisitionRunnable(JobExecutor jobExecutor)
public void run()
protected JobAcquisitionContext initializeAcquisitionContext()
protected void configureNextAcquisitionCycle(JobAcquisitionContext acquisitionContext, JobAcquisitionStrategy acquisitionStrategy)
protected JobAcquisitionStrategy initializeAcquisitionStrategy()
public JobAcquisitionContext getAcquisitionContext()
protected void executeJobs(JobAcquisitionContext context, ProcessEngineImpl currentProcessEngine, AcquiredJobs acquiredJobs)
protected AcquiredJobs acquireJobs(JobAcquisitionContext context, JobAcquisitionStrategy acquisitionStrategy, ProcessEngineImpl currentProcessEngine)
Copyright © 2021. All rights reserved.