|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.oscache.util.FastCronParser
Parses cron expressions and determines at what time in the past is the most recent match for the supplied expression.
Constructor Summary | |
FastCronParser()
Creates a FastCronParser that uses a default cron expression of "* * * * *".
|
|
FastCronParser(String cronExpression)
Constructs a new FastCronParser based on the supplied expression. |
Method Summary | |
String |
getCronExpression()
Retrieves the current cron expression. |
String |
getExpressionSummary()
Recreates the original human-readable cron expression based on the internal datastructure values. |
long |
getTimeBefore(long time)
Find the most recent time that matches this cron expression. |
boolean |
hasMoreRecentMatch(long time)
Determines whether this cron expression matches a date/time that is more recent than the one supplied. |
void |
setCronExpression(String cronExpression)
Resets the cron expression to the value supplied. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FastCronParser()
"* * * * *".
This will match any time that is supplied.
public FastCronParser(String cronExpression) throws ParseException
ParseException
- if the supplied expression is not a valid cron expression.Method Detail |
public void setCronExpression(String cronExpression) throws ParseException
cronExpression
- the new cron expression.
ParseException
- if the supplied expression is not a valid cron expression.public String getCronExpression()
public boolean hasMoreRecentMatch(long time)
time
- The time to compare the cron expression against.
true
if the cron expression matches a time that is closer
to the current time than the supplied time is, false
otherwise.public long getTimeBefore(long time)
time
- The time (in milliseconds) that we're using as our upper bound.
public String getExpressionSummary()
|
OSCache Project Page | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |