|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.TimerTask
org.mmbase.applications.crontab.CronDaemon
CronDaemon is a "crontab" clone written in java. The daemon starts a thread that wakes up every minute (it keeps sync by calculating the time to sleep)
| Method Summary | |
void |
add(CronEntry entry)
Adds the given CronEntry to this daemon. |
protected void |
addEntry(CronEntry entry)
Actually adds, no checks for 'removedEntries' and so on. |
protected static CronEntry |
getById(Set set,
String id)
Finds in given set the CronEntry with the given id. |
CronEntry |
getCronEntry(String id)
|
Set |
getEntries()
|
static CronDaemon |
getInstance()
Singleton, Gets (and instantiates, and starts) the one CronDaemon instance. |
boolean |
isAlive()
|
static void |
main(String[] argv)
main only for testing purposes |
void |
remove(CronEntry entry)
Remove the given CronEntry from this daemon. |
protected void |
removeEntry(CronEntry entry)
Actually removes, nor checks for removedEntries' and so on. |
void |
run()
The main loop of the daemon, which of course is a Thread, implemented in run() to satisfy the 'Runnable' interface. |
void |
start()
Starts the daemon, which you might want to do if you have stopped if for some reason. |
void |
stop()
If you like to temporary stop the daemon, call this. |
| Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
protected static CronEntry getById(Set set,
String id)
null otherwise.public void add(CronEntry entry)
RuntimeException - If an entry with the same id is present already (unless it is running and scheduled for removal already)protected void addEntry(CronEntry entry)
public CronEntry getCronEntry(String id)
public void remove(CronEntry entry)
protected void removeEntry(CronEntry entry)
public void start()
public void stop()
public boolean isAlive()
public static CronDaemon getInstance()
public void run()
public Set getEntries()
public static void main(String[] argv)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||