Interface SimpleTrigger
- All Superinterfaces:
Cloneable,Comparable<Trigger>,Serializable,Trigger
- All Known Implementing Classes:
SimpleTriggerImpl
Trigger that is used to fire a Job at a given moment in time,
and optionally repeated at a specified interval.- Author:
- James House, contributions by Lieven Govaerts of Ebitec Nv, Belgium.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.quartz.triggers.Trigger
Trigger.CompletedExecutionInstruction, Trigger.TriggerTimeComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intInstructs thethat upon a mis-fire situation, theSchedulerwants to be fired now bySimpleTriggerScheduler.static final intInstructs thethat upon a mis-fire situation, theSchedulerwants to be re-scheduled to the next scheduled time after 'now' - taking into account any associatedSimpleTrigger, and with the repeat count left unchanged.Calendarstatic final intInstructs thethat upon a mis-fire situation, theSchedulerwants to be re-scheduled to the next scheduled time after 'now' - taking into account any associatedSimpleTrigger, and with the repeat count set to what it would be, if it had not missed any firings.Calendarstatic final intInstructs thethat upon a mis-fire situation, theSchedulerwants to be re-scheduled to 'now' (even if the associatedSimpleTriggerexcludes 'now') with the repeat count left as-is.Calendarstatic final intInstructs thethat upon a mis-fire situation, theSchedulerwants to be re-scheduled to 'now' (even if the associatedSimpleTriggerexcludes 'now') with the repeat count set to what it would be, if it had not missed any firings.Calendarstatic final intUsed to indicate the 'repeat count' of the trigger is indefinite.static final longFields inherited from interface org.quartz.triggers.Trigger
DEFAULT_PRIORITY, MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY, MISFIRE_INSTRUCTION_SMART_POLICY -
Method Summary
Modifier and TypeMethodDescriptionintGet the the number of times theSimpleTriggershould repeat, after which it will be automatically deleted.longGet the the time interval (in milliseconds) at which theSimpleTriggershould repeat.intGet the number of times theSimpleTriggerhas already fired.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.quartz.triggers.Trigger
equals, getCalendarName, getDescription, getEndTime, getFinalFireTime, getFireTimeAfter, getJobDataMap, getJobName, getMisfireInstruction, getName, getNextFireTime, getPreviousFireTime, getPriority, getStartTime, mayFireAgain
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
MISFIRE_INSTRUCTION_FIRE_NOW
static final int MISFIRE_INSTRUCTION_FIRE_NOWInstructs thethat upon a mis-fire situation, theSchedulerwants to be fired now bySimpleTriggerScheduler.NOTE: 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- See Also:
-
MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT
static final int MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNTInstructs thethat upon a mis-fire situation, theSchedulerwants to be re-scheduled to 'now' (even if the associatedSimpleTriggerexcludes 'now') with the repeat count left as-is. This does obey theCalendarTriggerend-time however, so if 'now' is after the end-time theTriggerwill not fire again.NOTE: 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).
- See Also:
-
MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT
static final int MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNTInstructs thethat upon a mis-fire situation, theSchedulerwants to be re-scheduled to 'now' (even if the associatedSimpleTriggerexcludes 'now') with the repeat count set to what it would be, if it had not missed any firings. This does obey theCalendarTriggerend-time however, so if 'now' is after the end-time theTriggerwill not fire again.NOTE: 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).
NOTE: This instruction could cause the
Triggerto go to the 'COMPLETE' state after firing 'now', if all the repeat-fire-times where missed.- See Also:
-
MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT
static final int MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNTInstructs thethat upon a mis-fire situation, theSchedulerwants to be re-scheduled to the next scheduled time after 'now' - taking into account any associatedSimpleTrigger, and with the repeat count set to what it would be, if it had not missed any firings.CalendarNOTE/WARNING: This instruction could cause the
Triggerto go directly to the 'COMPLETE' state if all fire-times where missed.- See Also:
-
MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT
static final int MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNTInstructs thethat upon a mis-fire situation, theSchedulerwants to be re-scheduled to the next scheduled time after 'now' - taking into account any associatedSimpleTrigger, and with the repeat count left unchanged.CalendarNOTE/WARNING: This instruction could cause the
Triggerto go directly to the 'COMPLETE' state if the end-time of the trigger has arrived.- See Also:
-
REPEAT_INDEFINITELY
static final int REPEAT_INDEFINITELYUsed to indicate the 'repeat count' of the trigger is indefinite. Or in other words, the trigger should repeat continually until the trigger's ending timestamp.- See Also:
-
-
Method Details
-
getRepeatCount
int getRepeatCount()Get the the number of times theSimpleTriggershould repeat, after which it will be automatically deleted.- See Also:
-
getRepeatInterval
long getRepeatInterval()Get the the time interval (in milliseconds) at which theSimpleTriggershould repeat. -
getTimesTriggered
int getTimesTriggered()Get the number of times theSimpleTriggerhas already fired.
-