org.qi4j.library.scheduler.schedule.cron
Class CronSchedule.CronScheduleMixin
java.lang.Object
org.qi4j.library.scheduler.schedule.cron.CronSchedule.CronScheduleMixin
- All Implemented Interfaces:
- Composite, EntityComposite, Identity, CronSchedule, Schedule
- Enclosing interface:
- CronSchedule
public abstract static class CronSchedule.CronScheduleMixin
- extends java.lang.Object
- implements CronSchedule
Method Summary |
boolean |
isTaskRunning()
|
long |
nextRun(long from)
Compute the next time this schedule is to be run. |
java.lang.String |
presentationString()
Return a representation of the Schedule in a human understandable format. |
void |
taskCompletedSuccessfully()
Called directly after the Runnable.run() method has been completed and
returned from the method normally. |
void |
taskCompletedWithException(java.lang.RuntimeException ex)
Called directly after the Runnable.run() method has been completed but
threw a RuntimeException. |
void |
taskStarting()
Called just before the Runnable.run() method is called. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.qi4j.library.scheduler.schedule.Schedule |
start, task |
CronSchedule.CronScheduleMixin
public CronSchedule.CronScheduleMixin()
taskStarting
public void taskStarting()
- Description copied from interface:
Schedule
- Called just before the
Runnable.run()
method is called.
- Specified by:
taskStarting
in interface Schedule
taskCompletedSuccessfully
public void taskCompletedSuccessfully()
- Description copied from interface:
Schedule
- Called directly after the
Runnable.run()
method has been completed and
returned from the method normally.
- Specified by:
taskCompletedSuccessfully
in interface Schedule
taskCompletedWithException
public void taskCompletedWithException(java.lang.RuntimeException ex)
- Description copied from interface:
Schedule
- Called directly after the
Runnable.run()
method has been completed but
threw a RuntimeException.
- Specified by:
taskCompletedWithException
in interface Schedule
presentationString
public java.lang.String presentationString()
- Description copied from interface:
Schedule
- Return a representation of the Schedule in a human understandable format.
- Specified by:
presentationString
in interface Schedule
- Returns:
- A String representing this schedule.
isTaskRunning
public boolean isTaskRunning()
- Specified by:
isTaskRunning
in interface Schedule
- Returns:
- True if the associated
Task
is currently running, false otherwise
nextRun
public long nextRun(long from)
- Description copied from interface:
Schedule
- Compute the next time this schedule is to be run.
- Specified by:
nextRun
in interface Schedule
- Parameters:
from
- The starting time when to look for the next time it will run.
- Returns:
- The exact absolute time when this Schedule is to be run next time.