Package org.graylog.scheduler
Class DefaultJobSchedulerConfig
java.lang.Object
org.graylog.scheduler.DefaultJobSchedulerConfig
- All Implemented Interfaces:
JobSchedulerConfig
This is the default
JobSchedulerConfig.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultJobSchedulerConfig(LeaderElectionService leaderElectionService, JobSchedulerConfiguration config) -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if the scheduler can execute the next loop iteration.Concurrency limits per job type.intThe number of worker threads to start.
-
Constructor Details
-
DefaultJobSchedulerConfig
@Inject public DefaultJobSchedulerConfig(LeaderElectionService leaderElectionService, JobSchedulerConfiguration config)
-
-
Method Details
-
canExecute
public boolean canExecute()Description copied from interface:JobSchedulerConfigDetermines if the scheduler can execute the next loop iteration. This method will be called at the beginning of each scheduler loop iteration so it should be fast!- Specified by:
canExecutein interfaceJobSchedulerConfig- Returns:
- true if scheduler can execute next loop iteration
-
numberOfWorkerThreads
public int numberOfWorkerThreads()Description copied from interface:JobSchedulerConfigThe number of worker threads to start.- Specified by:
numberOfWorkerThreadsin interfaceJobSchedulerConfig- Returns:
- number of worker threads
-
concurrencyLimits
Description copied from interface:JobSchedulerConfigConcurrency limits per job type.- Specified by:
concurrencyLimitsin interfaceJobSchedulerConfig- Returns:
- mapping of job type to max number of worker threads to assign for this job type. A missing entry signifies unlimited concurrency (up to numberOfWorkerThreads)
-