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 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 executor
      jobClaimService - claim service
      jobMetrics - durable job metrics
      jobSettings - validated durable job settings
      jobWorker - durable worker
      jobWorkerRegistry - accepted claim registry
      workerId - 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.