|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.Thread
net.spy.SpyThread
net.spy.cron.Cron
Watches a JobQueue and invokes the Jobs when they're ready.
| Field Summary |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
Cron(JobQueue jq)
Get a new Cron instance operating on the given queue. |
|
Cron(String name,
JobQueue jq)
Get a new Cron instance with a name, JobQueue and the default thread pool. |
|
Cron(String name,
JobQueue jq,
ThreadPool tp)
Get a new Cron object operating on the given queue. |
|
| Method Summary | |
JobQueue |
getJobQueue()
Get the current job queue. |
boolean |
isRunning()
True if this Cron instance is still running. |
static void |
main(String[] args)
Run a Cron instance against a FileJobQueue. |
void |
run()
Do the run thing. |
void |
setMaxIdleTime(long maxIdleTime)
Set the maximum amount of time the cron thread will continue running with no jobs. |
void |
shutdown()
Shut down the queue. |
String |
toString()
String me. |
| Methods inherited from class net.spy.SpyThread |
getLogger |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Cron(JobQueue jq)
jq - the job queue to watch
public Cron(String name,
JobQueue jq)
name - name of the cron instancejq - the queue to watch
public Cron(String name,
JobQueue jq,
ThreadPool tp)
name - thread namejq - job queue to watchtp - the thread pool| Method Detail |
public String toString()
public JobQueue getJobQueue()
public void shutdown()
public boolean isRunning()
public void run()
public void setMaxIdleTime(long maxIdleTime)
maxIdleTime - maximum amount of time in milliseconds
public static void main(String[] args)
throws Exception
Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||