|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.schedule.ScheduleComputeHelper
public final class ScheduleComputeHelper
For a crontab-like schedule, this class computes the next occurance given a start time and a specification of what the schedule looks like. The resolution at which this works is at the second level. The next occurance is always at least 1 second ahead. The class implements an algorithm that starts at the highest precision (seconds) and continues to the lowest precicion (month). For each precision level the algorithm looks at the list of valid values and finds a value for each that is equal to or greater then the valid values supplied. If no equal or greater value was supplied, it will reset all higher precision elements to its minimum value.
Constructor Summary | |
---|---|
ScheduleComputeHelper()
|
Method Summary | |
---|---|
static long |
computeDeltaNextOccurance(ScheduleSpec spec,
long afterTimeInMillis)
Computes the next lowest date in milliseconds based on a specification and the from-time passed in and returns the delta from the current time. |
static long |
computeNextOccurance(ScheduleSpec spec,
long afterTimeInMillis)
Computes the next lowest date in milliseconds based on a specification and the from-time passed in. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScheduleComputeHelper()
Method Detail |
---|
public static long computeNextOccurance(ScheduleSpec spec, long afterTimeInMillis)
spec
- defines the scheduleafterTimeInMillis
- defines the start time
public static long computeDeltaNextOccurance(ScheduleSpec spec, long afterTimeInMillis)
spec
- defines the scheduleafterTimeInMillis
- defines the start time
|
© 2006-2011 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |