Class JobDispatcher
java.lang.Object
com.bluebell.greenhouse.radicle.scheduled.job.JobDispatcher
@Component
@ConditionalOnProperty(name="bluebell.jobs.dispatcher.enabled",
havingValue="true")
public class JobDispatcher
extends Object
Polls committed due work and dispatches granted claims to the bounded worker pool.
- Version:
- 3.0.6
- Author:
- Stephen Prizio
-
Constructor Summary
ConstructorsConstructorDescriptionJobDispatcher(Executor executor, JobClaimService jobClaimService, JobMetrics jobMetrics, JobSettings jobSettings, JobWorker jobWorker, JobWorkerRegistry jobWorkerRegistry, String workerId) Creates the durable dispatcher. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatch()Claims at most as much work as this process has free worker threads and dispatches it.
-
Constructor Details
-
JobDispatcher
public JobDispatcher(@Qualifier("jobWorkerExecutor") Executor executor, JobClaimService jobClaimService, JobMetrics jobMetrics, JobSettings jobSettings, JobWorker jobWorker, JobWorkerRegistry jobWorkerRegistry, @Qualifier("jobWorkerId") String workerId) Creates the durable dispatcher.- Parameters:
executor- bounded worker executorjobClaimService- claim servicejobMetrics- durable job metricsjobSettings- validated durable job settingsjobWorker- durable workerjobWorkerRegistry- accepted claim registryworkerId- process worker identifier
-
-
Method Details
-
dispatch
@Scheduled(fixedDelayString="${bluebell.jobs.dispatcher.poll-milliseconds:1000}") public void dispatch()Claims at most as much work as this process has free worker threads and dispatches it.
-