|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
net.jot.scheduler.JOTScheduler
public class JOTScheduler
Generic scheduler, that can run scheduled task/items. any task can be registered into the scheduler using registerItem() Works like a cron mostly. It is started by JOT at startup (by JOTInitializer) Note that new jobs are looked for every minute, so the "granularity" is about 1 minute.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Method Summary | |
|---|---|
static JOTScheduler |
getInstance()
|
void |
registerItem(JOTScheduledItem item,
JOTSchedulingOptions options)
Register an item(ie: a job) in the scheduler. |
void |
run()
Main scheduler loop. |
void |
shutdown()
Shuts down the scheduler and release resources |
void |
unregisterItem(JOTScheduledItem item)
Unregisters a job from the sheculer, ie: remove it. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static JOTScheduler getInstance()
public void shutdown()
throws java.lang.Exception
java.lang.Exception
public void registerItem(JOTScheduledItem item,
JOTSchedulingOptions options)
item - options - public void unregisterItem(JOTScheduledItem item)
item - public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||