|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.util.CronTaskManager
public class CronTaskManager
Manages the creation and persistence of CronTasks. Multiple CronTaskManagers can be created each with an individual config file.
CronTask
,
CronTimer
Method Summary | |
---|---|
protected void |
addCronTask(CronTask cronTask)
Method which is used to add cron tasks to the manager without cluster propogation. |
CronTask |
createCronTask(java.lang.Runnable task,
CronTimer timer)
Create a new CronTask. |
void |
deleteCronTask(CronTask task)
Persist the CronTask configuration. |
void |
destroy()
Notifies the manager to release any resources that may be holding on too. |
int |
getCronTaskCount()
Returns the number of currently configured CronTasks. |
java.util.Iterator |
getCronTasks()
Returns a list of all the currently configured CronTasks. |
static CronTaskManager |
getInstance()
|
void |
initialize()
Initialize the manager. |
void |
removeCronTask(CronTask cronTask)
Stop the cronTask and remove the cronTask from the current list of CronTasks. |
protected void |
removeCronTaskNoCluster(CronTask cronTask)
Method which is used to stop and remove cron tasks without cluster propogation. |
void |
saveCronTask(CronTask task)
Persist the CronTask configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CronTaskManager getInstance()
public void initialize()
JiveManager
This method is used internally by Jive during application startup and should not be called during normal usage of the class.
initialize
in interface JiveManager
public void destroy()
JiveManager
destroy
in interface JiveManager
public CronTask createCronTask(java.lang.Runnable task, CronTimer timer)
This class is only useful for tasks which should be persisted across app-server restarts. Tasks that should be run immediately or just a single time in the near future should use the
TaskEngine.addTask(Runnable)
method instead of this class.
task
- the task to schedule.timer
- the CronTimer to use for scheduling the task
protected void addCronTask(CronTask cronTask)
cronTask
- the cron task to addpublic void removeCronTask(CronTask cronTask)
cronTask
- the CronTask to removeprotected void removeCronTaskNoCluster(CronTask cronTask)
CronClusterUpdateTask
class.
cronTask
- the CronTask to removepublic int getCronTaskCount()
public java.util.Iterator getCronTasks()
public void saveCronTask(CronTask task)
public void deleteCronTask(CronTask task)
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |