|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.JobQueue
public class JobQueue
Manage the pending jobs according to whatever algorithm is appropriate, giving preference to earlier scheduled jobs.
Constructor Summary | |
---|---|
JobQueue(RouterContext context)
|
Method Summary | |
---|---|
void |
addJob(Job job)
Enqueue the specified job |
void |
allowParallelOperation()
|
Job |
getLastJob()
retrieve the most recently begin and still currently active job, or null if no jobs are running |
long |
getLastJobBegin()
When did the most recently begin job start? |
long |
getLastJobEnd()
When did the most recently begin job start? |
long |
getMaxLag()
|
(package private) Job |
getNext()
Blocking call to retrieve the next ready job |
int |
getReadyCount()
|
(package private) boolean |
isAlive()
|
void |
removeJob(Job job)
|
(package private) void |
removeRunner(int id)
|
void |
renderStatusHTML(java.io.Writer out)
|
void |
restart()
|
void |
runQueue(int numThreads)
Start up the queue with the specified number of concurrent processors. |
(package private) void |
shutdown()
|
void |
timingUpdated()
|
(package private) void |
updateStats(Job job,
long doStart,
long origStartAfter,
long duration)
calculate and update the job timings if it was lagged too much or took too long to run, spit out a warning (and if its really excessive, kill the router) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JobQueue(RouterContext context)
Method Detail |
---|
public void addJob(Job job)
public void removeJob(Job job)
public void timingUpdated()
public int getReadyCount()
public long getMaxLag()
public void allowParallelOperation()
public void restart()
void shutdown()
boolean isAlive()
public long getLastJobBegin()
public long getLastJobEnd()
public Job getLastJob()
Job getNext()
public void runQueue(int numThreads)
void removeRunner(int id)
void updateStats(Job job, long doStart, long origStartAfter, long duration)
public void renderStatusHTML(java.io.Writer out) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |