camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [camel] branch master updated: Update quartz docs with misfire instructions
Date Wed, 02 Jan 2019 14:20:40 GMT
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new d1c07b0  Update quartz docs with misfire instructions
d1c07b0 is described below

commit d1c07b0f60a71451d86cb6f106196f16ef30d521
Author: Claus Ibsen <claus.ibsen@gmail.com>
AuthorDate: Wed Jan 2 15:20:21 2019 +0100

    Update quartz docs with misfire instructions
---
 .../src/main/docs/quartz2-component.adoc           | 100 +++++++++++++++++++++
 1 file changed, 100 insertions(+)

diff --git a/components/camel-quartz2/src/main/docs/quartz2-component.adoc b/components/camel-quartz2/src/main/docs/quartz2-component.adoc
index 7c31a6d..03c5348 100644
--- a/components/camel-quartz2/src/main/docs/quartz2-component.adoc
+++ b/components/camel-quartz2/src/main/docs/quartz2-component.adoc
@@ -287,6 +287,106 @@ quartz2://groupName/timerName?cron=0+0/5+12-18+?+*+MON-FRI&trigger.timeZone=Euro
 
 The timeZone value is the values accepted by `java.util.TimeZone`.
 
+=== Configuring misfire instructions
+
+The quartz scheduler can be configured with a misfire instruction
+to handle misfire situations for the trigger.
+The concrete trigger type that you are using will have defined a set of additional `MISFIRE_INSTRUCTION_XXX`
+constants that may be set as this property's value.
+
+For example to configure the simple trigger to use misfire instruction 4:
+
+----
+quartz2://myGroup/myTimerName?trigger.repeatInterval=2000&trigger.misfireInstruction=4
+----
+
+And likewise you can configure the cron trigger with one of its misfire instructions as well:
+----
+quartz2://myGroup/myTimerName?cron=0/2+*+*+*+*+?trigger.misfireInstruction=2
+----
+
+The simple and cron triggers has the following misfire instructions representative:
+
+==== SimpleTrigger.MISFIRE_INSTRUCTION_FIRE_NOW = 1 (default)
+
+Instructs the Scheduler that upon a mis-fire
+situation, the SimpleTrigger wants to be fired now by Scheduler.
+
+This instruction should typically only be used for
+'one-shot' (non-repeating) Triggers. If it is used on a trigger with a
+repeat count > 0 then it is equivalent to the instruction MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT.
+
+==== SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT = 2
+
+Instructs the Scheduler that upon a mis-fire
+situation, the SimpleTrigger wants to be
+re-scheduled to 'now' (even if the associated Calendar excludes 'now')
+with the repeat count left as-is.  This does obey the
+Trigger end-time however, so if 'now' is after the
+end-time the Trigger will not fire again.
+
+Use of this instruction causes the trigger to 'forget'
+the start-time and repeat-count that it was originally setup with (this
+is only an issue if you for some reason wanted to be able to tell what
+the original values were at some later time).
+
+==== SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT = 3
+
+Instructs the Scheduler that upon a mis-fire
+situation, the SimpleTrigger wants to be
+re-scheduled to 'now' (even if the associated Calendar
+excludes 'now') with the repeat count set to what it would be, if it had
+not missed any firings.  This does obey the Trigger end-time
+however, so if 'now' is after the end-time the Trigger will
+not fire again.
+
+Use of this instruction causes the trigger to 'forget'
+the start-time and repeat-count that it was originally setup with.
+Instead, the repeat count on the trigger will be changed to whatever
+the remaining repeat count is (this is only an issue if you for some
+reason wanted to be able to tell what the original values were at some
+later time).
+
+This instruction could cause the Trigger
+to go to the 'COMPLETE' state after firing 'now', if all the
+repeat-fire-times where missed.
+
+==== SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT = 4
+
+Instructs the Scheduler that upon a mis-fire
+situation, the SimpleTrigger wants to be
+re-scheduled to the next scheduled time after 'now' - taking into
+account any associated Calendar and with the
+repeat count set to what it would be, if it had not missed any firings.
+
+WARNING: This instruction could cause the Trigger
+to go directly to the 'COMPLETE' state if all fire-times where missed.
+
+==== SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT = 5
+
+Instructs the Scheduler that upon a mis-fire
+situation, the SimpleTrigger wants to be
+re-scheduled to the next scheduled time after 'now' - taking into
+account any associated Calendar, and with the repeat count left unchanged.
+
+WARNING: This instruction could cause the <code>Trigger</code>
+to go directly to the 'COMPLETE' state if the end-time of the trigger
+has arrived.
+
+==== CronTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW = 1 (default)
+
+Instructs the Scheduler that upon a mis-fire
+situation, the CronTrigger wants to be fired now by Scheduler.
+
+==== CronTrigger.MISFIRE_INSTRUCTION_DO_NOTHING = 2
+
+Instructs the Scheduler that upon a mis-fire
+situation, the CronTrigger wants to have it's
+next-fire-time updated to the next time in the schedule after the
+current time (taking into account any associated Calendar
+but it does not want to be fired now.
+
+
 === Using QuartzScheduledPollConsumerScheduler
 
 The <<quartz2-component,Quartz2>> component provides a


Mime
View raw message