public interface Schedule
A Schedule is used to specify when a scheduled job is to take place. The Schedule is able to calculate the next time that its job will take place. The Schedule also indicates whether it is a repeating or one-shot job (a repeating job remains in a Scheduler after it occurs, a one-shot job is removed from the Scheduler after it occurs).
It is possible that some more complex Schedules will be unable to calculate the next time a scheduled job will occur. The Scheduler handling the Schedule is responsible for dealing with these Schedules. For example, the CalendarSchedule is unable to calculate its next job time unless its job will occur on the current date. The Scheduler can handle these by checking every midnight to see if any Schedulers that were unable to calculate their next times before will now be able to do so.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
Modifier and Type | Method and Description |
---|---|
long |
getNextJobTime(long pLastOccurrenceTime)
Returns the next time that the job Scheduled by this will take
place.
|
boolean |
isRepeating()
Returns true if this is a repeating job, false if this is a
one-shot job.
|
boolean |
mustKnowFirstTime()
If true, then the first time getNextJobTime is called it will be
called with -1.
|
java.lang.String |
scheduleString()
Returns a Parseable representation of this Schedule.
|
java.lang.String |
scheduleString(java.util.Locale pLocale)
Returns a Parseable representation of this Schedule based on the locale.
|
static final java.lang.String CLASS_VERSION
long getNextJobTime(long pLastOccurrenceTime)
pLastOccurrenceTime
- the last time the job occurred,
or -1 if it has not yet occurred.boolean mustKnowFirstTime()
boolean isRepeating()
java.lang.String scheduleString()
java.lang.String scheduleString(java.util.Locale pLocale)