|
|||||||||||
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(java.lang.String cronExpression)
Constructs a new FastCronParser based on the supplied expression. |
Method Summary | |
java.lang.String |
getCronExpression()
Retrieves the current cron expression. |
java.lang.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(java.lang.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(java.lang.String cronExpression) throws java.text.ParseException
java.text.ParseException
- if the supplied expression is not a valid cron expression.Method Detail |
public void setCronExpression(java.lang.String cronExpression) throws java.text.ParseException
cronExpression
- the new cron expression.
java.text.ParseException
- if the supplied expression is not a valid cron expression.public java.lang.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 java.lang.String getExpressionSummary()
|
See www.opensymphony.com for more information. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |