Class DailyTimeIntervalTriggerImpl
- java.lang.Object
-
- org.quartz.impl.triggers.AbstractTrigger<DailyTimeIntervalTrigger>
-
- org.quartz.impl.triggers.DailyTimeIntervalTriggerImpl
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<Trigger>
,DailyTimeIntervalTrigger
,CoreTrigger
,MutableTrigger
,OperableTrigger
,Trigger
public class DailyTimeIntervalTriggerImpl extends AbstractTrigger<DailyTimeIntervalTrigger> implements DailyTimeIntervalTrigger, CoreTrigger
A concrete implementation of DailyTimeIntervalTrigger that is used to fire a
based upon daily repeating time intervals.JobDetail
The trigger will fire every N (see
setRepeatInterval(int)
) seconds, minutes or hours (seesetRepeatIntervalUnit(org.quartz.DateBuilder.IntervalUnit)
) during a given time window on specified days of the week.For example#1, a trigger can be set to fire every 72 minutes between 8:00 and 11:00 everyday. It's fire times would be 8:00, 9:12, 10:24, then next day would repeat: 8:00, 9:12, 10:24 again.
For example#2, a trigger can be set to fire every 23 minutes between 9:20 and 16:47 Monday through Friday.
On each day, the starting fire time is reset to startTimeOfDay value, and then it will add repeatInterval value to it until the endTimeOfDay is reached. If you set daysOfWeek values, then fire time will only occur during those week days period. Again, remember this trigger will reset fire time each day with startTimeOfDay, regardless of your interval or endTimeOfDay!
The default values for fields if not set are: startTimeOfDay defaults to 00:00:00, the endTimeOfDay default to 23:59:59, and daysOfWeek is default to every day. The startTime default to current time-stamp now, while endTime has not value.
If startTime is before startTimeOfDay, then startTimeOfDay will be used and startTime has no affect other than to specify the first day of firing. Else if startTime is after startTimeOfDay, then the first fire time for that day will be the next interval after the startTime. For example, if you set startingTimeOfDay=9am, endingTimeOfDay=11am, interval=15 mins, and startTime=9:33am, then the next fire time will be 9:45pm. Note also that if you do not set startTime value, the trigger builder will default to current time, and current time maybe before or after the startTimeOfDay! So be aware how you set your startTime.
This trigger also supports "repeatCount" feature to end the trigger fire time after a certain number of count is reached. Just as the SimpleTrigger, setting repeatCount=0 means trigger will fire once only! Setting any positive count then the trigger will repeat count + 1 times. Unlike SimpleTrigger, the default value of repeatCount of this trigger is set to REPEAT_INDEFINITELY instead of 0 though.
- Since:
- 2.1.0
- Author:
- James House, Zemian Deng <[email protected]>
- See Also:
DailyTimeIntervalTrigger
,DailyTimeIntervalScheduleBuilder
, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.quartz.Trigger
Trigger.CompletedExecutionInstruction, Trigger.TriggerState, Trigger.TriggerTimeComparator
-
-
Field Summary
-
Fields inherited from interface org.quartz.DailyTimeIntervalTrigger
MISFIRE_INSTRUCTION_DO_NOTHING, MISFIRE_INSTRUCTION_FIRE_ONCE_NOW, REPEAT_INDEFINITELY
-
Fields inherited from interface org.quartz.Trigger
DEFAULT_PRIORITY, MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY, MISFIRE_INSTRUCTION_SMART_POLICY
-
-
Constructor Summary
Constructors Constructor Description DailyTimeIntervalTriggerImpl()
Create aDailyTimeIntervalTrigger
with no settings.DailyTimeIntervalTriggerImpl(java.lang.String name, java.lang.String group, java.lang.String jobName, java.lang.String jobGroup, java.util.Date startTime, java.util.Date endTime, TimeOfDay startTimeOfDay, TimeOfDay endTimeOfDay, DateBuilder.IntervalUnit intervalUnit, int repeatInterval)
Create aDailyTimeIntervalTrigger
that will occur at the given time, fire the identifiedJob
and repeat at the the given interval until the given end time.DailyTimeIntervalTriggerImpl(java.lang.String name, java.lang.String group, java.util.Date startTime, java.util.Date endTime, TimeOfDay startTimeOfDay, TimeOfDay endTimeOfDay, DateBuilder.IntervalUnit intervalUnit, int repeatInterval)
Create aDailyTimeIntervalTrigger
that will occur at the given time, and repeat at the the given interval until the given end time.DailyTimeIntervalTriggerImpl(java.lang.String name, java.lang.String group, TimeOfDay startTimeOfDay, TimeOfDay endTimeOfDay, DateBuilder.IntervalUnit intervalUnit, int repeatInterval)
Create aDailyTimeIntervalTrigger
that will occur immediately, and repeat at the the given interval.DailyTimeIntervalTriggerImpl(java.lang.String name, java.util.Date startTime, java.util.Date endTime, TimeOfDay startTimeOfDay, TimeOfDay endTimeOfDay, DateBuilder.IntervalUnit intervalUnit, int repeatInterval)
Create aDailyTimeIntervalTrigger
that will occur at the given time, and repeat at the the given interval until the given end time.DailyTimeIntervalTriggerImpl(java.lang.String name, TimeOfDay startTimeOfDay, TimeOfDay endTimeOfDay, DateBuilder.IntervalUnit intervalUnit, int repeatInterval)
Create aDailyTimeIntervalTrigger
that will occur immediately, and repeat at the the given interval.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Date
computeFirstFireTime(Calendar calendar)
Called by the scheduler at the time aTrigger
is first added to the scheduler, in order to have theTrigger
compute its first fire time, based on any associated calendar.java.util.Set<java.lang.Integer>
getDaysOfWeek()
The days of the week upon which to fire.java.util.Date
getEndTime()
Get the time at which theDailyTimeIntervalTrigger
should quit repeating.TimeOfDay
getEndTimeOfDay()
The time of day to complete firing at the given interval.java.util.Date
getFinalFireTime()
Returns the final time at which theDailyTimeIntervalTrigger
will fire, if there is no end time set, null will be returned.java.util.Date
getFireTimeAfter(java.util.Date afterTime)
Returns the next time at which theDailyTimeIntervalTrigger
will fire, after the given time.java.util.Date
getNextFireTime()
Returns the next time at which theTrigger
is scheduled to fire.java.util.Date
getPreviousFireTime()
Returns the previous time at which theDailyTimeIntervalTrigger
fired.int
getRepeatCount()
Get the the number of times for interval this trigger should repeat, after which it will be automatically deleted.int
getRepeatInterval()
Get the the time interval that will be added to theDateIntervalTrigger
's fire time (in the set repeat interval unit) in order to calculate the time of the next trigger repeat.DateBuilder.IntervalUnit
getRepeatIntervalUnit()
Get the interval unit - the time unit on with the interval applies.ScheduleBuilder<DailyTimeIntervalTrigger>
getScheduleBuilder()
Get aScheduleBuilder
that is configured to produce a schedule identical to this trigger's schedule.java.util.Date
getStartTime()
Get the time at which theDailyTimeIntervalTrigger
should occur.TimeOfDay
getStartTimeOfDay()
The time of day to start firing at the given interval.int
getTimesTriggered()
Get the number of times theDateIntervalTrigger
has already fired.boolean
hasAdditionalProperties()
This trigger has no additional properties besides what's defined in this class.boolean
mayFireAgain()
Determines whether or not theDailyTimeIntervalTrigger
will occur again.void
setDaysOfWeek(java.util.Set<java.lang.Integer> daysOfWeek)
void
setEndTime(java.util.Date endTime)
Set the time at which theDailyTimeIntervalTrigger
should quit repeating (and be automatically deleted).void
setEndTimeOfDay(TimeOfDay endTimeOfDay)
void
setNextFireTime(java.util.Date nextFireTime)
Set the next time at which theDailyTimeIntervalTrigger
should fire.void
setPreviousFireTime(java.util.Date previousFireTime)
Set the previous time at which theDailyTimeIntervalTrigger
fired.void
setRepeatCount(int repeatCount)
void
setRepeatInterval(int repeatInterval)
set the the time interval that will be added to theDailyTimeIntervalTrigger
's fire time (in the set repeat interval unit) in order to calculate the time of the next trigger repeat.void
setRepeatIntervalUnit(DateBuilder.IntervalUnit intervalUnit)
Set the interval unit - the time unit on with the interval applies.void
setStartTime(java.util.Date startTime)
Set the time at which theDailyTimeIntervalTrigger
should occur.void
setStartTimeOfDay(TimeOfDay startTimeOfDay)
void
setTimesTriggered(int timesTriggered)
Set the number of times theDailyTimeIntervalTrigger
has already fired.void
triggered(Calendar calendar)
Called when the
has decided to 'fire' the trigger (execute the associatedScheduler
Job
), in order to give theTrigger
a chance to update itself for its next triggering (if any).void
updateAfterMisfire(Calendar cal)
Updates theDailyTimeIntervalTrigger
's state based on the MISFIRE_INSTRUCTION_XXX that was selected when theDailyTimeIntervalTrigger
was created.void
updateWithNewCalendar(Calendar calendar, long misfireThreshold)
This method should not be used by the Quartz client.void
validate()
Validates whether the properties of theJobDetail
are valid for submission into aScheduler
.protected boolean
validateMisfireInstruction(int misfireInstruction)
-
Methods inherited from class org.quartz.impl.triggers.AbstractTrigger
clone, compareTo, equals, executionComplete, getCalendarName, getDescription, getFireInstanceId, getFullJobName, getFullName, getGroup, getJobDataMap, getJobGroup, getJobKey, getJobName, getKey, getMisfireInstruction, getName, getPriority, getTriggerBuilder, hashCode, setCalendarName, setDescription, setFireInstanceId, setGroup, setJobDataMap, setJobGroup, setJobKey, setJobName, setKey, setMisfireInstruction, setName, setPriority, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.quartz.DailyTimeIntervalTrigger
getTriggerBuilder
-
Methods inherited from interface org.quartz.Trigger
compareTo, equals, getCalendarName, getDescription, getJobDataMap, getJobKey, getKey, getMisfireInstruction, getPriority
-
-
-
-
Constructor Detail
-
DailyTimeIntervalTriggerImpl
public DailyTimeIntervalTriggerImpl()
Create a
DailyTimeIntervalTrigger
with no settings.
-
DailyTimeIntervalTriggerImpl
public DailyTimeIntervalTriggerImpl(java.lang.String name, TimeOfDay startTimeOfDay, TimeOfDay endTimeOfDay, DateBuilder.IntervalUnit intervalUnit, int repeatInterval)
Create a
DailyTimeIntervalTrigger
that will occur immediately, and repeat at the the given interval.- Parameters:
startTimeOfDay
- TheTimeOfDay
that the repeating should begin occurring.endTimeOfDay
- TheTimeOfDay
that the repeating should stop occurring.intervalUnit
- The repeat interval unit. The only intervals that are valid for this type of trigger areDateBuilder.IntervalUnit.SECOND
,DateBuilder.IntervalUnit.MINUTE
, andDateBuilder.IntervalUnit.HOUR
.- Throws:
java.lang.IllegalArgumentException
- if an invalid IntervalUnit is given, or the repeat interval is zero or less.
-
DailyTimeIntervalTriggerImpl
public DailyTimeIntervalTriggerImpl(java.lang.String name, java.lang.String group, TimeOfDay startTimeOfDay, TimeOfDay endTimeOfDay, DateBuilder.IntervalUnit intervalUnit, int repeatInterval)
Create a
DailyTimeIntervalTrigger
that will occur immediately, and repeat at the the given interval.- Parameters:
startTimeOfDay
- TheTimeOfDay
that the repeating should begin occurring.endTimeOfDay
- TheTimeOfDay
that the repeating should stop occurring.intervalUnit
- The repeat interval unit. The only intervals that are valid for this type of trigger areDateBuilder.IntervalUnit.SECOND
,DateBuilder.IntervalUnit.MINUTE
, andDateBuilder.IntervalUnit.HOUR
.- Throws:
java.lang.IllegalArgumentException
- if an invalid IntervalUnit is given, or the repeat interval is zero or less.
-
DailyTimeIntervalTriggerImpl
public DailyTimeIntervalTriggerImpl(java.lang.String name, java.util.Date startTime, java.util.Date endTime, TimeOfDay startTimeOfDay, TimeOfDay endTimeOfDay, DateBuilder.IntervalUnit intervalUnit, int repeatInterval)
Create a
DailyTimeIntervalTrigger
that will occur at the given time, and repeat at the the given interval until the given end time.- Parameters:
startTime
- ADate
set to the time for theTrigger
to fire.endTime
- ADate
set to the time for theTrigger
to quit repeat firing.startTimeOfDay
- TheTimeOfDay
that the repeating should begin occurring.endTimeOfDay
- TheTimeOfDay
that the repeating should stop occurring.intervalUnit
- The repeat interval unit. The only intervals that are valid for this type of trigger areDateBuilder.IntervalUnit.SECOND
,DateBuilder.IntervalUnit.MINUTE
, andDateBuilder.IntervalUnit.HOUR
.repeatInterval
- The number of milliseconds to pause between the repeat firing.- Throws:
java.lang.IllegalArgumentException
- if an invalid IntervalUnit is given, or the repeat interval is zero or less.
-
DailyTimeIntervalTriggerImpl
public DailyTimeIntervalTriggerImpl(java.lang.String name, java.lang.String group, java.util.Date startTime, java.util.Date endTime, TimeOfDay startTimeOfDay, TimeOfDay endTimeOfDay, DateBuilder.IntervalUnit intervalUnit, int repeatInterval)
Create a
DailyTimeIntervalTrigger
that will occur at the given time, and repeat at the the given interval until the given end time.- Parameters:
startTime
- ADate
set to the time for theTrigger
to fire.endTime
- ADate
set to the time for theTrigger
to quit repeat firing.startTimeOfDay
- TheTimeOfDay
that the repeating should begin occurring.endTimeOfDay
- TheTimeOfDay
that the repeating should stop occurring.intervalUnit
- The repeat interval unit. The only intervals that are valid for this type of trigger areDateBuilder.IntervalUnit.SECOND
,DateBuilder.IntervalUnit.MINUTE
, andDateBuilder.IntervalUnit.HOUR
.repeatInterval
- The number of milliseconds to pause between the repeat firing.- Throws:
java.lang.IllegalArgumentException
- if an invalid IntervalUnit is given, or the repeat interval is zero or less.
-
DailyTimeIntervalTriggerImpl
public DailyTimeIntervalTriggerImpl(java.lang.String name, java.lang.String group, java.lang.String jobName, java.lang.String jobGroup, java.util.Date startTime, java.util.Date endTime, TimeOfDay startTimeOfDay, TimeOfDay endTimeOfDay, DateBuilder.IntervalUnit intervalUnit, int repeatInterval)
Create a
DailyTimeIntervalTrigger
that will occur at the given time, fire the identifiedJob
and repeat at the the given interval until the given end time.- Parameters:
startTime
- ADate
set to the time for theTrigger
to fire.endTime
- ADate
set to the time for theTrigger
to quit repeat firing.startTimeOfDay
- TheTimeOfDay
that the repeating should begin occurring.endTimeOfDay
- TheTimeOfDay
that the repeating should stop occurring.intervalUnit
- The repeat interval unit. The only intervals that are valid for this type of trigger areDateBuilder.IntervalUnit.SECOND
,DateBuilder.IntervalUnit.MINUTE
, andDateBuilder.IntervalUnit.HOUR
.repeatInterval
- The number of milliseconds to pause between the repeat firing.- Throws:
java.lang.IllegalArgumentException
- if an invalid IntervalUnit is given, or the repeat interval is zero or less.
-
-
Method Detail
-
getStartTime
public java.util.Date getStartTime()
Get the time at which the
DailyTimeIntervalTrigger
should occur. It defaults to the getStartTimeOfDay of current day.- Specified by:
getStartTime
in interfaceTrigger
- Specified by:
getStartTime
in classAbstractTrigger<DailyTimeIntervalTrigger>
-
setStartTime
public void setStartTime(java.util.Date startTime)
Set the time at which the
DailyTimeIntervalTrigger
should occur.- Specified by:
setStartTime
in interfaceMutableTrigger
- Specified by:
setStartTime
in classAbstractTrigger<DailyTimeIntervalTrigger>
- Throws:
java.lang.IllegalArgumentException
- if startTime isnull
.
-
getEndTime
public java.util.Date getEndTime()
Get the time at which the
DailyTimeIntervalTrigger
should quit repeating.- Specified by:
getEndTime
in interfaceTrigger
- Specified by:
getEndTime
in classAbstractTrigger<DailyTimeIntervalTrigger>
- See Also:
getFinalFireTime()
-
setEndTime
public void setEndTime(java.util.Date endTime)
Set the time at which the
DailyTimeIntervalTrigger
should quit repeating (and be automatically deleted).- Specified by:
setEndTime
in interfaceMutableTrigger
- Specified by:
setEndTime
in classAbstractTrigger<DailyTimeIntervalTrigger>
- Throws:
java.lang.IllegalArgumentException
- if endTime is before start time.- See Also:
TriggerUtils.computeEndTimeToAllowParticularNumberOfFirings(org.quartz.spi.OperableTrigger, org.quartz.Calendar, int)
-
getRepeatIntervalUnit
public DateBuilder.IntervalUnit getRepeatIntervalUnit()
Description copied from interface:DailyTimeIntervalTrigger
Get the interval unit - the time unit on with the interval applies.
The only intervals that are valid for this type of trigger are
DateBuilder.IntervalUnit.SECOND
,DateBuilder.IntervalUnit.MINUTE
, andDateBuilder.IntervalUnit.HOUR
.- Specified by:
getRepeatIntervalUnit
in interfaceDailyTimeIntervalTrigger
-
setRepeatIntervalUnit
public void setRepeatIntervalUnit(DateBuilder.IntervalUnit intervalUnit)
Set the interval unit - the time unit on with the interval applies.
- Parameters:
intervalUnit
- The repeat interval unit. The only intervals that are valid for this type of trigger areDateBuilder.IntervalUnit.SECOND
,DateBuilder.IntervalUnit.MINUTE
, andDateBuilder.IntervalUnit.HOUR
.
-
getRepeatInterval
public int getRepeatInterval()
Description copied from interface:DailyTimeIntervalTrigger
Get the the time interval that will be added to the
DateIntervalTrigger
's fire time (in the set repeat interval unit) in order to calculate the time of the next trigger repeat.- Specified by:
getRepeatInterval
in interfaceDailyTimeIntervalTrigger
-
setRepeatInterval
public void setRepeatInterval(int repeatInterval)
set the the time interval that will be added to the
DailyTimeIntervalTrigger
's fire time (in the set repeat interval unit) in order to calculate the time of the next trigger repeat.- Throws:
java.lang.IllegalArgumentException
- if repeatInterval is < 1
-
getTimesTriggered
public int getTimesTriggered()
Description copied from interface:DailyTimeIntervalTrigger
Get the number of times the
DateIntervalTrigger
has already fired.- Specified by:
getTimesTriggered
in interfaceDailyTimeIntervalTrigger
-
setTimesTriggered
public void setTimesTriggered(int timesTriggered)
Set the number of times the
DailyTimeIntervalTrigger
has already fired.
-
validateMisfireInstruction
protected boolean validateMisfireInstruction(int misfireInstruction)
- Specified by:
validateMisfireInstruction
in classAbstractTrigger<DailyTimeIntervalTrigger>
-
updateAfterMisfire
public void updateAfterMisfire(Calendar cal)
Updates the
DailyTimeIntervalTrigger
's state based on the MISFIRE_INSTRUCTION_XXX that was selected when theDailyTimeIntervalTrigger
was created.If the misfire instruction is set to MISFIRE_INSTRUCTION_SMART_POLICY, then the following scheme will be used:
- The instruction will be interpreted as
MISFIRE_INSTRUCTION_FIRE_ONCE_NOW
- Specified by:
updateAfterMisfire
in interfaceOperableTrigger
- Specified by:
updateAfterMisfire
in classAbstractTrigger<DailyTimeIntervalTrigger>
- The instruction will be interpreted as
-
triggered
public void triggered(Calendar calendar)
Called when the
has decided to 'fire' the trigger (execute the associatedScheduler
Job
), in order to give theTrigger
a chance to update itself for its next triggering (if any).- Specified by:
triggered
in interfaceOperableTrigger
- Specified by:
triggered
in classAbstractTrigger<DailyTimeIntervalTrigger>
- See Also:
AbstractTrigger.executionComplete(JobExecutionContext, JobExecutionException)
-
updateWithNewCalendar
public void updateWithNewCalendar(Calendar calendar, long misfireThreshold)
Description copied from class:AbstractTrigger
This method should not be used by the Quartz client.
To be implemented by the concrete class.
The implementation should update the
Trigger
's state based on the given new version of the associatedCalendar
(the state should be updated so that it's next fire time is appropriate given the Calendar's new settings).- Specified by:
updateWithNewCalendar
in interfaceOperableTrigger
- Specified by:
updateWithNewCalendar
in classAbstractTrigger<DailyTimeIntervalTrigger>
- Parameters:
calendar
- the modifying calendar- See Also:
AbstractTrigger.updateWithNewCalendar(org.quartz.Calendar, long)
-
computeFirstFireTime
public java.util.Date computeFirstFireTime(Calendar calendar)
Called by the scheduler at the time a
Trigger
is first added to the scheduler, in order to have theTrigger
compute its first fire time, based on any associated calendar.After this method has been called,
getNextFireTime()
should return a valid answer.- Specified by:
computeFirstFireTime
in interfaceOperableTrigger
- Specified by:
computeFirstFireTime
in classAbstractTrigger<DailyTimeIntervalTrigger>
- Returns:
- the first time at which the
Trigger
will be fired by the scheduler, which is also the same valuegetNextFireTime()
will return (until after the first firing of theTrigger
).
-
getNextFireTime
public java.util.Date getNextFireTime()
Returns the next time at which the
Trigger
is scheduled to fire. If the trigger will not fire again,null
will be returned. Note that the time returned can possibly be in the past, if the time that was computed for the trigger to next fire has already arrived, but the scheduler has not yet been able to fire the trigger (which would likely be due to lack of resources e.g. threads).The value returned is not guaranteed to be valid until after the
Trigger
has been added to the scheduler.- Specified by:
getNextFireTime
in interfaceTrigger
- Specified by:
getNextFireTime
in classAbstractTrigger<DailyTimeIntervalTrigger>
- See Also:
TriggerUtils.computeFireTimesBetween(org.quartz.spi.OperableTrigger, org.quartz.Calendar, java.util.Date, java.util.Date)
-
getPreviousFireTime
public java.util.Date getPreviousFireTime()
Returns the previous time at which the
DailyTimeIntervalTrigger
fired. If the trigger has not yet fired,null
will be returned.- Specified by:
getPreviousFireTime
in interfaceTrigger
- Specified by:
getPreviousFireTime
in classAbstractTrigger<DailyTimeIntervalTrigger>
-
setNextFireTime
public void setNextFireTime(java.util.Date nextFireTime)
Set the next time at which the
DailyTimeIntervalTrigger
should fire.This method should not be invoked by client code.
- Specified by:
setNextFireTime
in interfaceOperableTrigger
-
setPreviousFireTime
public void setPreviousFireTime(java.util.Date previousFireTime)
Set the previous time at which the
DailyTimeIntervalTrigger
fired.This method should not be invoked by client code.
- Specified by:
setPreviousFireTime
in interfaceOperableTrigger
-
getFireTimeAfter
public java.util.Date getFireTimeAfter(java.util.Date afterTime)
Returns the next time at which the
DailyTimeIntervalTrigger
will fire, after the given time. If the trigger will not fire after the given time,null
will be returned.- Specified by:
getFireTimeAfter
in interfaceTrigger
- Specified by:
getFireTimeAfter
in classAbstractTrigger<DailyTimeIntervalTrigger>
-
getFinalFireTime
public java.util.Date getFinalFireTime()
Returns the final time at which the
DailyTimeIntervalTrigger
will fire, if there is no end time set, null will be returned.Note that the return time may be in the past.
- Specified by:
getFinalFireTime
in interfaceTrigger
- Specified by:
getFinalFireTime
in classAbstractTrigger<DailyTimeIntervalTrigger>
-
mayFireAgain
public boolean mayFireAgain()
Determines whether or not the
DailyTimeIntervalTrigger
will occur again.- Specified by:
mayFireAgain
in interfaceTrigger
- Specified by:
mayFireAgain
in classAbstractTrigger<DailyTimeIntervalTrigger>
-
validate
public void validate() throws SchedulerException
Validates whether the properties of the
JobDetail
are valid for submission into aScheduler
.- Specified by:
validate
in interfaceOperableTrigger
- Overrides:
validate
in classAbstractTrigger<DailyTimeIntervalTrigger>
- Throws:
java.lang.IllegalStateException
- if a required property (such as Name, Group, Class) is not set.SchedulerException
-
getDaysOfWeek
public java.util.Set<java.lang.Integer> getDaysOfWeek()
The days of the week upon which to fire.- Specified by:
getDaysOfWeek
in interfaceDailyTimeIntervalTrigger
- Returns:
- a Set containing the integers representing the days of the week, per the values 1-7 as defined by
Calendar.SUNDAY
-Calendar.SATURDAY
.
-
setDaysOfWeek
public void setDaysOfWeek(java.util.Set<java.lang.Integer> daysOfWeek)
-
getStartTimeOfDay
public TimeOfDay getStartTimeOfDay()
The time of day to start firing at the given interval.- Specified by:
getStartTimeOfDay
in interfaceDailyTimeIntervalTrigger
-
setStartTimeOfDay
public void setStartTimeOfDay(TimeOfDay startTimeOfDay)
-
getEndTimeOfDay
public TimeOfDay getEndTimeOfDay()
The time of day to complete firing at the given interval.- Specified by:
getEndTimeOfDay
in interfaceDailyTimeIntervalTrigger
-
setEndTimeOfDay
public void setEndTimeOfDay(TimeOfDay endTimeOfDay)
-
getScheduleBuilder
public ScheduleBuilder<DailyTimeIntervalTrigger> getScheduleBuilder()
Get aScheduleBuilder
that is configured to produce a schedule identical to this trigger's schedule.- Specified by:
getScheduleBuilder
in interfaceTrigger
- Specified by:
getScheduleBuilder
in classAbstractTrigger<DailyTimeIntervalTrigger>
- See Also:
AbstractTrigger.getTriggerBuilder()
-
hasAdditionalProperties
public boolean hasAdditionalProperties()
This trigger has no additional properties besides what's defined in this class.- Specified by:
hasAdditionalProperties
in interfaceCoreTrigger
-
getRepeatCount
public int getRepeatCount()
Description copied from interface:DailyTimeIntervalTrigger
Get the the number of times for interval this trigger should repeat, after which it will be automatically deleted.
- Specified by:
getRepeatCount
in interfaceDailyTimeIntervalTrigger
- See Also:
DailyTimeIntervalTrigger.REPEAT_INDEFINITELY
-
setRepeatCount
public void setRepeatCount(int repeatCount)
-
-