|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.quartz.impl.calendar.BaseCalendar
org.quartz.impl.calendar.DailyCalendar
This implementation of the Calendar excludes (or includes - see below) a
specified time range each day. For example, you could use this calendar to
exclude business hours (8AM - 5PM) every day. Each DailyCalendar
only allows a single time range to be specified, and that time range may not
cross daily boundaries (i.e. you cannot specify a time range from 8PM - 5AM).
If the property invertTimeRange is false (default),
the time range defines a range of times in which triggers are not allowed to
fire. If invertTimeRange is true, the time range
is inverted – that is, all times outside the defined time range
are excluded.
Note when using DailyCalendar, it behaves on the same principals
as, for example, WeeklyCalendar. WeeklyCalendar defines a set of days that are
excluded every week. Likewise, DailyCalendar defines a
set of times that are excluded every day.
| Field Summary |
| Fields inherited from interface org.quartz.Calendar |
MONTH |
| Constructor Summary | |
DailyCalendar(String name,
Calendar rangeStartingCalendar,
Calendar rangeEndingCalendar)
Create a DailyCalendar with a time range defined by the
specified java.util.Calendars and no
baseCalendar. |
|
DailyCalendar(String name,
Calendar baseCalendar,
Calendar rangeStartingCalendar,
Calendar rangeEndingCalendar)
Create a DailyCalendar with a time range defined by the
specified java.util.Calendars and the specified
baseCalendar. |
|
DailyCalendar(String name,
Calendar baseCalendar,
int rangeStartingHourOfDay,
int rangeStartingMinute,
int rangeStartingSecond,
int rangeStartingMillis,
int rangeEndingHourOfDay,
int rangeEndingMinute,
int rangeEndingSecond,
int rangeEndingMillis)
Create a DailyCalendar with a time range defined by the
specified values and the specified baseCalendar. |
|
DailyCalendar(String name,
Calendar baseCalendar,
long rangeStartingTimeInMillis,
long rangeEndingTimeInMillis)
Create a DailyCalendar with a time range defined by the
specified values and the specified baseCalendar. |
|
DailyCalendar(String name,
Calendar baseCalendar,
String rangeStartingTime,
String rangeEndingTime)
Create a DailyCalendar with a time range defined by the
specified strings and the specified baseCalendar. |
|
DailyCalendar(String name,
int rangeStartingHourOfDay,
int rangeStartingMinute,
int rangeStartingSecond,
int rangeStartingMillis,
int rangeEndingHourOfDay,
int rangeEndingMinute,
int rangeEndingSecond,
int rangeEndingMillis)
Create a DailyCalendar with a time range defined by the
specified values and no baseCalendar. |
|
DailyCalendar(String name,
long rangeStartingTimeInMillis,
long rangeEndingTimeInMillis)
Create a DailyCalendar with a time range defined by the
specified values and no baseCalendar. |
|
DailyCalendar(String name,
String rangeStartingTime,
String rangeEndingTime)
Create a DailyCalendar with a time range defined by the
specified strings and no baseCalendar. |
|
| Method Summary | |
boolean |
getInvertTimeRange()
Indicates whether the time range represents an inverted time range (see class description). |
String |
getName()
Returns the name of the DailyCalendar |
long |
getNextIncludedTime(long timeInMillis)
Determines the next time included by the DailyCalendar
after the specified time. |
long |
getTimeRangeEndingTimeInMillis(long timeInMillis)
Returns the end time of the time range (in milliseconds) of the day specified in timeInMillis |
long |
getTimeRangeStartingTimeInMillis(long timeInMillis)
Returns the start time of the time range (in milliseconds) of the day specified in timeInMillis |
boolean |
isTimeIncluded(long timeInMillis)
Determines whether the given time (in milliseconds) is 'included' by the BaseCalendar |
void |
setInvertTimeRange(boolean flag)
Indicates whether the time range represents an inverted time range (see class description). |
String |
toString()
Returns a string representing the properties of the DailyCalendar |
| Methods inherited from class org.quartz.impl.calendar.BaseCalendar |
buildHoliday, buildHoliday, getBaseCalendar, getDescription, getJavaCalendar, setBaseCalendar, setDescription |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DailyCalendar(String name,
String rangeStartingTime,
String rangeEndingTime)
DailyCalendar with a time range defined by the
specified strings and no baseCalendar.
rangeStartingTime and rangeEndingTime
must be in the format "HH:MM[:SS[:mmm]]" where:
name - the name for the DailyCalendarrangeStartingTime - a String representing the starting time for the
time rangerangeEndingTime - a String representing the ending time for the
the time range
public DailyCalendar(String name,
Calendar baseCalendar,
String rangeStartingTime,
String rangeEndingTime)
DailyCalendar with a time range defined by the
specified strings and the specified baseCalendar.
rangeStartingTime and rangeEndingTime
must be in the format "HH:MM[:SS[:mmm]]" where:
name - the name for the DailyCalendarbaseCalendar - the base calendar for this calendar instance
– see BaseCalendar for more
information on base calendar functionalityrangeStartingTime - a String representing the starting time for the
time rangerangeEndingTime - a String representing the ending time for the
time range
public DailyCalendar(String name,
int rangeStartingHourOfDay,
int rangeStartingMinute,
int rangeStartingSecond,
int rangeStartingMillis,
int rangeEndingHourOfDay,
int rangeEndingMinute,
int rangeEndingSecond,
int rangeEndingMillis)
DailyCalendar with a time range defined by the
specified values and no baseCalendar. Values are subject to
the following validations:
name - the name for the DailyCalendarrangeStartingHourOfDay - the hour of the start of the time rangerangeStartingMinute - the minute of the start of the time rangerangeStartingSecond - the second of the start of the time rangerangeStartingMillis - the millisecond of the start of the time
rangerangeEndingHourOfDay - the hour of the end of the time rangerangeEndingMinute - the minute of the end of the time rangerangeEndingSecond - the second of the end of the time rangerangeEndingMillis - the millisecond of the start of the time
range
public DailyCalendar(String name,
Calendar baseCalendar,
int rangeStartingHourOfDay,
int rangeStartingMinute,
int rangeStartingSecond,
int rangeStartingMillis,
int rangeEndingHourOfDay,
int rangeEndingMinute,
int rangeEndingSecond,
int rangeEndingMillis)
DailyCalendar with a time range defined by the
specified values and the specified baseCalendar. Values are
subject to the following validations:
name - the name for the
DailyCalendarbaseCalendar - the base calendar for this calendar
instance – see
BaseCalendar for more
information on base calendar
functionalityrangeStartingHourOfDay - the hour of the start of the time rangerangeStartingMinute - the minute of the start of the time rangerangeStartingSecond - the second of the start of the time rangerangeStartingMillis - the millisecond of the start of the time
rangerangeEndingHourOfDay - the hour of the end of the time rangerangeEndingMinute - the minute of the end of the time rangerangeEndingSecond - the second of the end of the time rangerangeEndingMillis - the millisecond of the start of the time
range
public DailyCalendar(String name,
Calendar rangeStartingCalendar,
Calendar rangeEndingCalendar)
DailyCalendar with a time range defined by the
specified java.util.Calendars and no
baseCalendar. The Calendars are subject to the following
considerations:
rangeStartingCalendar.after(rangeEndingCalendar) ==
true)
name - the name for the DailyCalendarrangeStartingCalendar - a java.util.Calendar representing the
starting time for the time rangerangeEndingCalendar - a java.util.Calendar representing the ending
time for the time range
public DailyCalendar(String name,
Calendar baseCalendar,
Calendar rangeStartingCalendar,
Calendar rangeEndingCalendar)
DailyCalendar with a time range defined by the
specified java.util.Calendars and the specified
baseCalendar. The Calendars are subject to the following
considerations:
rangeStartingCalendar.after(rangeEndingCalendar) ==
true)
name - the name for the DailyCalendarbaseCalendar - the base calendar for this calendar instance
– see BaseCalendar for more
information on base calendar functionalityrangeStartingCalendar - a java.util.Calendar representing the
starting time for the time rangerangeEndingCalendar - a java.util.Calendar representing the ending
time for the time range
public DailyCalendar(String name,
long rangeStartingTimeInMillis,
long rangeEndingTimeInMillis)
DailyCalendar with a time range defined by the
specified values and no baseCalendar. The values are
subject to the following considerations:
rangeStartingTime >
rangeEndingTime)
name - the name for the
DailyCalendarrangeStartingTimeInMillis - a long representing the starting time
for the time rangerangeEndingTimeInMillis - a long representing the ending time for
the time range
public DailyCalendar(String name,
Calendar baseCalendar,
long rangeStartingTimeInMillis,
long rangeEndingTimeInMillis)
DailyCalendar with a time range defined by the
specified values and the specified baseCalendar. The values
are subject to the following considerations:
rangeStartingTime >
rangeEndingTime)
name - the name for the
DailyCalendarbaseCalendar - the base calendar for this calendar
instance – see BaseCalendar for more information on
base calendar functionalityrangeStartingTimeInMillis - a long representing the starting time
for the time rangerangeEndingTimeInMillis - a long representing the ending time for
the time range| Method Detail |
public String getName()
DailyCalendar
DailyCalendarpublic boolean isTimeIncluded(long timeInMillis)
BaseCalendar
isTimeIncluded in interface CalendarisTimeIncluded in class BaseCalendartimeInMillis - the date/time to test
BaseCalendarCalendar.isTimeIncluded(long)public long getNextIncludedTime(long timeInMillis)
DailyCalendar
after the specified time.
getNextIncludedTime in interface CalendargetNextIncludedTime in class BaseCalendartimeInMillis - the initial date/time after which to find an
included time
Calendar.getNextIncludedTime(long)public long getTimeRangeStartingTimeInMillis(long timeInMillis)
timeInMillis
timeInMillis - a time containing the desired date for the starting
time of the time range.
public long getTimeRangeEndingTimeInMillis(long timeInMillis)
timeInMillis
timeInMillis - a time containing the desired date for the ending
time of the time range.
public boolean getInvertTimeRange()
public void setInvertTimeRange(boolean flag)
flag - the new value for the invertTimeRange flag.public String toString()
DailyCalendar
|
Quartz Enterprise Job Scheduler Project Page | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||