Package io.quarkus.quartz.runtime
Class QuartzRuntimeConfig
- java.lang.Object
-
- io.quarkus.quartz.runtime.QuartzRuntimeConfig
-
@ConfigRoot(phase=RUN_TIME) public class QuartzRuntimeConfig extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QuartzRuntimeConfig.QuartzMisfirePolicyConfig
static class
QuartzRuntimeConfig.TriggerConfig
-
Field Summary
Fields Modifier and Type Field Description long
batchTriggerAcquisitionFireAheadTimeWindow
The amount of time in milliseconds that a trigger is allowed to be acquired and fired ahead of its scheduled fire time.int
batchTriggerAcquisitionMaxCount
The maximum number of triggers that a scheduler node is allowed to acquire (for firing) at once.QuartzRuntimeConfig.TriggerConfig
cronTriggerConfig
Cron trigger default configurationString
instanceId
The identifier of Quartz instance that must be unique for all schedulers working as if they are the same logical Scheduler within a cluster.String
instanceName
The name of the Quartz instance.Map<String,QuartzRuntimeConfig.QuartzMisfirePolicyConfig>
misfirePolicyPerJobs
Misfire policy per job configuration.Duration
misfireThreshold
Defines how late the schedulers should be to be considered misfired.boolean
runBlockingScheduledMethodOnQuartzThread
When set totrue
, blocking scheduled methods are invoked on a thread managed by Quartz instead of a thread from the regular Quarkus thread pool (default).Duration
shutdownWaitTime
The maximum amount of time Quarkus will wait for currently running jobs to finish.QuartzRuntimeConfig.TriggerConfig
simpleTriggerConfig
Simple trigger default configurationOptional<QuartzStartMode>
startMode
Deprecated.Usequarkus.scheduler.start-mode
instead.int
threadCount
The size of scheduler thread pool.int
threadPriority
Thread priority of worker threads in the pool.
-
Constructor Summary
Constructors Constructor Description QuartzRuntimeConfig()
-
-
-
Field Detail
-
instanceName
@ConfigItem(defaultValue="QuarkusQuartzScheduler") public String instanceName
The name of the Quartz instance.
-
instanceId
@ConfigItem(defaultValue="AUTO") public String instanceId
The identifier of Quartz instance that must be unique for all schedulers working as if they are the same logical Scheduler within a cluster. Use the default valueAUTO
or some of the configured instance ID generators if you wish the identifier to be generated for you.
-
batchTriggerAcquisitionFireAheadTimeWindow
@ConfigItem(defaultValue="0") public long batchTriggerAcquisitionFireAheadTimeWindow
The amount of time in milliseconds that a trigger is allowed to be acquired and fired ahead of its scheduled fire time.
-
batchTriggerAcquisitionMaxCount
@ConfigItem(defaultValue="1") public int batchTriggerAcquisitionMaxCount
The maximum number of triggers that a scheduler node is allowed to acquire (for firing) at once.
-
threadCount
@ConfigItem(defaultValue="25") public int threadCount
The size of scheduler thread pool. This will initialize the number of worker threads in the pool.
-
threadPriority
@ConfigItem(defaultValue="5") public int threadPriority
Thread priority of worker threads in the pool.
-
misfireThreshold
@ConfigItem(defaultValue="60") public Duration misfireThreshold
Defines how late the schedulers should be to be considered misfired.
-
startMode
@ConfigItem @Deprecated public Optional<QuartzStartMode> startMode
Deprecated.Usequarkus.scheduler.start-mode
instead.Scheduler can be started in different modes: normal, forced or halted. By default, the scheduler is not started unless aScheduled
business method is found. If set to "forced", scheduler will be started even if no scheduled business methods are found. This is necessary for "pure" programmatic scheduling. Additionally, setting it to "halted" will behave just like forced mode but the scheduler will not start triggering jobs until an explicit start is called from the main scheduler. This is useful to programmatically register listeners before scheduler starts performing some work.
-
shutdownWaitTime
@ConfigItem(defaultValue="10") public Duration shutdownWaitTime
The maximum amount of time Quarkus will wait for currently running jobs to finish. If the value is0
, then Quarkus will not wait at all for these jobs to finish - it will callorg.quartz.Scheduler.shutdown(false)
in this case.
-
simpleTriggerConfig
@ConfigItem(name="simple-trigger") public QuartzRuntimeConfig.TriggerConfig simpleTriggerConfig
Simple trigger default configuration
-
cronTriggerConfig
@ConfigItem(name="cron-trigger") public QuartzRuntimeConfig.TriggerConfig cronTriggerConfig
Cron trigger default configuration
-
misfirePolicyPerJobs
@ConfigDocSection @ConfigDocMapKey("identity") @ConfigItem(name="misfire-policy") public Map<String,QuartzRuntimeConfig.QuartzMisfirePolicyConfig> misfirePolicyPerJobs
Misfire policy per job configuration.
-
runBlockingScheduledMethodOnQuartzThread
@ConfigItem(defaultValue="false") public boolean runBlockingScheduledMethodOnQuartzThread
When set totrue
, blocking scheduled methods are invoked on a thread managed by Quartz instead of a thread from the regular Quarkus thread pool (default).When this option is enabled, blocking scheduled methods do not run on a
duplicated context
.
-
-