|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.apache.jetspeed.aggregator.impl.WorkerImpl
public class WorkerImpl
Worker thread processes jobs and notify its WorkerMonitor when completed. When no work is available, the worker simply sets itself in a waiting mode pending reactivation by the WorkerMonitor
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
Commons logging |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
WorkerImpl(WorkerMonitor monitor)
|
|
WorkerImpl(WorkerMonitor monitor,
java.lang.ThreadGroup tg,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
java.lang.Runnable |
getJob()
Retrieves the job to execute |
int |
getJobCount()
Return the number of jobs processed by this worker since the last time it has been on the idle queue |
void |
resetJobCount()
Reset the processed job counter |
void |
run()
Process the job assigned, then notify Monitor. |
void |
setJob(java.lang.Runnable job)
Sets the job to execute |
void |
setJob(java.lang.Runnable job,
java.security.AccessControlContext context)
Sets the job to execute in security context |
void |
setMonitor(WorkerMonitor monitor)
Sets the moitor of this worker |
void |
setRunning(boolean status)
Sets the running status of this Worker. |
| 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 |
| Methods inherited from interface org.apache.jetspeed.aggregator.Worker |
|---|
start |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public WorkerImpl(WorkerMonitor monitor)
public WorkerImpl(WorkerMonitor monitor,
java.lang.ThreadGroup tg,
java.lang.String name)
| Method Detail |
|---|
public int getJobCount()
getJobCount in interface Workerpublic void resetJobCount()
resetJobCount in interface Workerpublic void setRunning(boolean status)
setRunning in interface Workerpublic void setMonitor(WorkerMonitor monitor)
setMonitor in interface Worker
public void setJob(java.lang.Runnable job,
java.security.AccessControlContext context)
setJob in interface Workerpublic void setJob(java.lang.Runnable job)
setJob in interface Workerpublic java.lang.Runnable getJob()
getJob in interface Workerpublic 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 | |||||||||