Package org.graylog.scheduler
Class JobExecutionEngine
java.lang.Object
org.graylog.scheduler.JobExecutionEngine
The job execution engine checks runnable triggers and starts job execution in the given worker pool.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionJobExecutionEngine
(DBJobTriggerService jobTriggerService, DBJobDefinitionService jobDefinitionService, JobSchedulerEventBus eventBus, JobScheduleStrategies scheduleStrategies, JobTriggerUpdates.Factory jobTriggerUpdatesFactory, Map<String, Job.Factory> jobFactory, JobWorkerPool workerPool, com.codahale.metrics.MetricRegistry metricRegistry) -
Method Summary
-
Constructor Details
-
JobExecutionEngine
@Inject public JobExecutionEngine(DBJobTriggerService jobTriggerService, DBJobDefinitionService jobDefinitionService, JobSchedulerEventBus eventBus, JobScheduleStrategies scheduleStrategies, JobTriggerUpdates.Factory jobTriggerUpdatesFactory, Map<String, Job.Factory> jobFactory, JobWorkerPool workerPool, com.codahale.metrics.MetricRegistry metricRegistry)
-
-
Method Details
-
shutdown
public void shutdown()Signal shutdown to the engine. -
execute
public boolean execute()Execute the engine. This will try to lock a trigger and execute the job if there are free slots in the worker pool and the engine is not shutting down.- Returns:
- true if a job trigger has been locked and the related job has been triggered, false otherwise
-
updateLockedJobs
public void updateLockedJobs()
-