public class RecurringTimeSchedule extends java.lang.Object implements Schedulable, com.ibm.itim.util.xml.objectstream.Importable
| Constructor and Description |
|---|
RecurringTimeSchedule(int minute,
int hour,
int dayOfMonth,
int month,
int dayOfWeek)
Constructs the RecurringTimeSchedule with the given schedule
parameters.
|
RecurringTimeSchedule(int minute,
int hour,
int dayOfMonth,
int month,
int dayOfWeek,
int dayOfQuarter,
int dayOfSemiAnnual)
Constructs the RecurringTimeSchedule with the given schedule
parameters.
|
RecurringTimeSchedule(int minute,
int hour,
int dayOfMonth,
int month,
java.lang.String daysOfWeek)
Constructs the RecurringTimeSchedule with the given schedule
parameters.
|
RecurringTimeSchedule(int minute,
int hour,
int dayOfMonth,
int month,
java.lang.String daysOfWeek,
int dayOfQuarter,
int dayOfSemiAnnual)
Constructs the RecurringTimeSchedule with the given schedule
parameters.
|
RecurringTimeSchedule(int minute,
int hour,
int dayOfMonth,
int month,
java.lang.String daysOfWeek,
int dayOfWeek,
int dayOfQuarter,
int dayOfSemiAnnual)
Constructs the RecurringTimeSchedule with the given schedule
parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDayOfMonth()
Returns the day of the month of the RecurringTimeSchedule as configured.
|
int |
getDayOfMonth(int month)
Returns the day of the month of the RecurringTimeSchedule during
runtime that interpret settings greater than 28 correctly by month
|
int |
getDayOfQuarter()
Returns the day of the quarter of the RecurringTimeSchedule.
|
int |
getDayOfSemiAnnual()
Returns the day of the semi-annual of the RecurringTimeSchedule.
|
int |
getDayOfWeek()
Returns the day of the week of the RecurringTimeSchedule.
|
java.lang.String |
getDaysOfWeek()
Returns the days of the week of the RecurringTimeSchedule.
|
int |
getHour()
Returns the hour of the RecurringTimeSchedule.
|
int |
getMinute()
Returns the minute of the RecurringTimeSchedule.
|
int |
getMonth()
Returns the month of the RecurringTimeSchedule.
|
java.util.TimeZone |
getTimeZone()
Returns the timezone that the schedule is configured with.
|
boolean |
isDaily()
Method to check if the schedule is daily.
|
boolean |
isHourly()
Method to check if the schedule is hourly.
|
boolean |
isMinutely()
Method to check if the schedule is minutely.
|
boolean |
isMonthly()
Method to check if the schedule is monthly.
|
boolean |
isQuarterly()
Method to check if the schedule is quarterly.
|
boolean |
isSemiAnnually()
Method to check if the schedule is semi-annually.
|
boolean |
isWeekly()
Method to check if the schedule is weekly.
|
boolean |
isWeeklyWithSpecificDays()
Method to check if the schedule is weekly with specific days selected.
|
long |
schedule(long time)
Returns the next scheduled date in milliseconds since the
epoch.
|
void |
setDayOfMonth(int dayOfMonth)
Changes the day of the month of the RecurringTimeSchedule.
|
void |
setDayOfQuarter(int dayOfQuarter)
Changes the day of the quarter of the RecurringTimeSchedule.
|
void |
setDayOfSemiAnnual(int dayOfSemiAnnual)
Changes the day of the semi-annual of the RecurringTimeSchedule.
|
void |
setDayOfWeek(int dayOfWeek)
Changes the day of the week of the RecurringTimeSchedule.
|
void |
setDaysOfWeek(java.lang.String daysOfWeek)
Changes the days of the week of the RecurringTimeSchedule.
|
void |
setHour(int hour)
Changes the hour of the RecurringTimeSchedule.
|
void |
setMinute(int minute)
Changes the minute of the RecurringTimeSchedule.
|
void |
setMonth(int month)
Changes the month of the RecurringTimeSchedule.
|
void |
setTimeZone(java.util.TimeZone timeZone)
Method to set the schedule time zone.
|
public RecurringTimeSchedule(int minute,
int hour,
int dayOfMonth,
int month,
int dayOfWeek)
minute - minute of the schedule. Allowed values are 0-59.hour - hour of the schedule. Allowed values are 0-23.dayOfMonth - day of month of the schedule (-1 if every day). This attribute
is exclusive with dayOfWeek. To set the dayOfMonth value other
than -1(daily), the month value must be set either to
specific month or -1(monthly). Allowed values are 1-28, if the schedule
is set to monthly otherwise the allowed value varies
according to the month value.month - month of the alarm (-1 if every month). Allowed
values are 1-12 (1 = January, 2 = February, ...).dayOfWeek - day of week of the alarm (-1 if every day).
This attribute is exclusive with dayOfMonth.
Allowed values are 1-7 (1 = Sunday, 2 = Monday,
...). java.util.Calendar constants can be
used.public RecurringTimeSchedule(int minute,
int hour,
int dayOfMonth,
int month,
java.lang.String daysOfWeek)
minute - minute of the schedule. Allowed values are 0-59.hour - hour of the schedule. Allowed values are 0-23.dayOfMonth - day of month of the schedule (-1 if every day). This attribute
is exclusive with dayOfWeek. To set the dayOfMonth value other
than -1(daily), the month value must be set either to
specific month or -1(monthly). Allowed values are 1-28, if the schedule
is set to monthly otherwise the allowed value varies
according to the month value.month - month of the alarm (-1 if every month). Allowed
values are 1-12 (1 = January, 2 = February, ...).daysOfWeek - days of week of the alarm.
This attribute is exclusive with dayOfMonth.
Allowed values are 1-7 (1 = Sunday, 2 = Monday,
...). java.util.Calendar constants can be
used and multiple values are
specified in pipe-separated format
(1|2 = Sunday and Monday).public RecurringTimeSchedule(int minute,
int hour,
int dayOfMonth,
int month,
int dayOfWeek,
int dayOfQuarter,
int dayOfSemiAnnual)
minute - minute of the schedule. Allowed values are 0-59.hour - hour of the schedule. Allowed values are 0-23.dayOfMonth - day of month of the schedule (-1 if every day). This attribute
is exclusive with dayOfWeek. To set the dayOfMonth value other
than -1(daily), the month value should be set either to a
specific month or -1(monthly). Allowed values are 1-28, if schedule
is set to monthly, otherwise the allowed value varies
according to the month value.month - month of the alarm (-1 if every month). Allowed
values are 1-12 (1 = January, 2 = February, ...).dayOfWeek - day of week of the alarm (-1 if every day).
This attribute is exclusive with dayOfMonth.
Allowed values are 1-7 (1 = Sunday, 2 = Monday,
...). java.util.Calendar constants can be
used.dayOfQuarter - (0 for disabled by quarterly, otherwise 1-90)
dayOfQuarter is exclusive with dayOfMonth, dayOfWeek and dayOfSemiAnnual,
therefore value of dayOfMonth, dayOfWeek and dayOfSemiAnnual
is set to ignore.dayOfSemiAnnual - (0 for disabled by semi-annually, otherwise 1-180)
dayOfSemiAnnual is exclusive with dayOfMonth, dayOfWeek and
dayOfQuarter therefore value of dayOfMonth, dayOfWeek and
dayOfQuarter is set to ignore.public RecurringTimeSchedule(int minute,
int hour,
int dayOfMonth,
int month,
java.lang.String daysOfWeek,
int dayOfQuarter,
int dayOfSemiAnnual)
minute - minute of the schedule. Allowed values are 0-59.hour - hour of the schedule. Allowed values are 0-23.dayOfMonth - day of month of the schedule (-1 if every day). This attribute
is exclusive with dayOfWeek. To set the dayOfMonth value other
than -1(daily), the month value should be set either to a
specific month or -1(monthly). Allowed values are 1-28, if schedule
is set to monthly, otherwise the allowed value varies
according to the month value.month - month of the alarm (-1 if every month). Allowed
values are 1-12 (1 = January, 2 = February, ...).daysOfWeek - days of week of the alarm.
This attribute is exclusive with dayOfMonth.
Allowed values are 1-7 (1 = Sunday, 2 = Monday,
...). java.util.Calendar constants can be
used and multiple values are
specified in pipe-separated format
(1|2 = Sunday and Monday).dayOfQuarter - (0 for disabled by quarterly, otherwise 1-90)
dayOfQuarter is exclusive with dayOfMonth, dayOfWeek and dayOfSemiAnnual,
therefore value of dayOfMonth, dayOfWeek and dayOfSemiAnnual
is set to ignore.dayOfSemiAnnual - (0 for disabled by semi-annually, otherwise 1-180)
dayOfSemiAnnual is exclusive with dayOfMonth, dayOfWeek and
dayOfQuarter therefore value of dayOfMonth, dayOfWeek and
dayOfQuarter is set to ignore.public RecurringTimeSchedule(int minute,
int hour,
int dayOfMonth,
int month,
java.lang.String daysOfWeek,
int dayOfWeek,
int dayOfQuarter,
int dayOfSemiAnnual)
minute - minute of the schedule. Allowed values are 0-59.hour - hour of the schedule. Allowed values are 0-23.dayOfMonth - day of month of the schedule (-1 if every day). This attribute
is exclusive with dayOfWeek. To set the dayOfMonth value other
than -1(daily), the month value should be set either to a
specific month or -1(monthly). Allowed values are 1-28, if schedule
is set to monthly, otherwise the allowed value varies
according to the month value.month - month of the alarm (-1 if every month). Allowed
values are 1-12 (1 = January, 2 = February, ...).daysOfWeek - days of week of the alarm.
This attribute is exclusive with dayOfMonth.
Allowed values are 1-7 (1 = Sunday, 2 = Monday,
...). java.util.Calendar constants can be
used and multiple values are
specified in pipe-separated format
(1|2 = Sunday and Monday).dayOfWeek - days of week of the alarm. This is deprecated and can not be used
along with daysOfWeek. Value is ignored if daysOfWeek contains not null value.
This attribute is exclusive with dayOfMonth.
Allowed values are 1-7 (1 = Sunday, 2 = Monday,
...). java.util.Calendar constants can be
used and multiple values are
specified in pipe-separated format
(1|2 = Sunday and Monday).dayOfQuarter - (0 for disabled by quarterly, otherwise 1-90)
dayOfQuarter is exclusive with dayOfMonth, dayOfWeek and dayOfSemiAnnual,
therefore value of dayOfMonth, dayOfWeek and dayOfSemiAnnual
is set to ignore.dayOfSemiAnnual - (0 for disabled by semi-annually, otherwise 1-180)
dayOfSemiAnnual is exclusive with dayOfMonth, dayOfWeek and
dayOfQuarter therefore value of dayOfMonth, dayOfWeek and
dayOfQuarter is set to ignore.public int getMinute()
public void setMinute(int minute)
minute - new minute to configure. Allowed values are 0-59.java.lang.IllegalArgumentException - Thrown if argument is not within the range.public int getHour()
public void setHour(int hour)
hour - new hour to configure. Allowed values are 0-23. (-1 if every hour.)java.lang.IllegalArgumentException - Thrown if argument is not within the range.public int getMonth()
public void setMonth(int month)
month - new month to configure (-1 if every month). (0 if ignore)
Allowed values are 0-12 (1 = January, 2 = February,
...).java.lang.IllegalArgumentException - Thrown if argument is not within the range.public int getDayOfWeek()
public java.lang.String getDaysOfWeek()
public void setDayOfWeek(int dayOfWeek)
dayOfWeek - new day of the week to configure (-1 if every
day) (0 if ignore). This attribute is exclusive with
dayOfMonth. Allowed values are 1-7 (1 = Sunday,
2 = Monday, ...). java.util.Calendar
constants can be used.java.lang.IllegalArgumentException - Thrown if argument is not within the range.public void setDaysOfWeek(java.lang.String daysOfWeek)
daysOfWeek - new days of the week to configure
This attribute is exclusive with
dayOfMonth. Allowed values 1-7 (1 = Sunday,
2 = Monday, ...) and multiple values are
specified in pipe-separated format
(1|2 = Sunday and Monday)java.lang.IllegalArgumentException - Thrown if argument is not within the range.public void setDayOfQuarter(int dayOfQuarter)
dayOfQuarter - day of the quarter(0 for disabled by quarterly, otherwise 1-90).java.lang.IllegalArgumentException - Thrown if argument is not within the range.public int getDayOfQuarter()
public void setDayOfSemiAnnual(int dayOfSemiAnnual)
dayOfSemiAnnual - day of the semi-annual(0 for disabled by semi-annually, otherwise 1-180).java.lang.IllegalArgumentException - Thrown if argument is not within the range.public int getDayOfSemiAnnual()
public int getDayOfMonth()
public int getDayOfMonth(int month)
public void setDayOfMonth(int dayOfMonth)
dayOfMonth - new day of the month to configure (-1 if it is
every day). This attribute is exclusive with
dayOfWeek therefore value of
dayOfWeek is set to ignore. To set the dayOfMonth value other
than -1(daily), the month value must be set either to
specific month or -1(monthly). Allowed values are 1-28 if the schedule
is set to monthly. If the month value is set to the schedule,
then the value can be set according to month.java.lang.IllegalArgumentException - Thrown if argument is not within the range.public void setTimeZone(java.util.TimeZone timeZone)
timeZone - public java.util.TimeZone getTimeZone()
public long schedule(long time)
schedule in interface Schedulabletime - the current time in milliseconds since the epoch.public boolean isDaily()
public boolean isMonthly()
public boolean isWeekly()
public boolean isWeeklyWithSpecificDays()
public boolean isHourly()
public boolean isMinutely()
public boolean isQuarterly()
public boolean isSemiAnnually()