java.lang.Object
org.elasticsearch.common.scheduler.TimeValueSchedule
- All Implemented Interfaces:
SchedulerEngine.Schedule
SchedulerEngine.Schedule implementation wrapping a TimeValue interval that'll compute the
next scheduled execution time according to the configured interval.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()longnextScheduledTimeAfter(long startTime, long time) Returns the next scheduled time after the given time, according to this schedule.
-
Constructor Details
-
TimeValueSchedule
-
-
Method Details
-
getInterval
-
nextScheduledTimeAfter
public long nextScheduledTimeAfter(long startTime, long time) Description copied from interface:SchedulerEngine.ScheduleReturns the next scheduled time after the given time, according to this schedule. If the given schedule cannot resolve the next scheduled time, then-1is returned. It really depends on the type of schedule to determine when-1is returned. Some schedules (e.g. IntervalSchedule) will never return-1as they can always compute the next scheduled time.Cronbased 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)- Specified by:
nextScheduledTimeAfterin interfaceSchedulerEngine.Schedule
-
hashCode
public int hashCode() -
equals
-