Module org.elasticsearch.server
Interface SchedulerEngine.Schedule
- All Known Implementing Classes:
TimeValueSchedule
- Enclosing class:
- SchedulerEngine
public static interface SchedulerEngine.Schedule
-
Method Summary
Modifier and TypeMethodDescriptionlong
nextScheduledTimeAfter
(long startTime, long now) Returns the next scheduled time after the given time, according to this schedule.
-
Method Details
-
nextScheduledTimeAfter
long nextScheduledTimeAfter(long startTime, long now) Returns the next scheduled time after the given time, according to this schedule. If the given schedule cannot resolve the next scheduled time, then-1
is returned. It really depends on the type of schedule to determine when-1
is returned. Some schedules (e.g. IntervalSchedule) will never return-1
as they can always compute the next scheduled time.Cron
based schedules are good example of schedules that may return-1
, for example, when the schedule only points to times that are all before the given time (in which case, there is no next scheduled time for the given time). Example: cron 0 0 0 * 1 ? 2013 (only points to days in January 2013) time 2015-01-01 12:00:00 (this time is in 2015)
-