|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.schmant.run.TaskExecutorStatus
public class TaskExecutorStatus
This object represents the current status of a TaskExecutor
. It keeps
track of the current number of waiting tasks and the current number of
running tasks in the executor. It also keeps track of all failed tasks.
Each time a task reports that it is is done via setDone()
(which it
does even if it fails), this class calls Object.notifyAll()
to wake up all
threads waiting for the object's monitor. This is used by
TaskExecutor.waitFor()
.
The methods of this class are protected by the intrinsic lock (synchronized
).
Scripts don't have to care about this.
TaskExecutor
Constructor Summary | |
---|---|
TaskExecutorStatus()
|
Method Summary | |
---|---|
void |
addWaiting()
Tell the status object that a new task is waiting. |
void |
flagForError(TaskRunnable t,
Throwable reason)
Flag that there have been build errors. |
Map<TaskRunnable,Throwable> |
getFailedTasks()
Get a map of failed tasks. |
boolean |
hasErrors()
Have there been build errors? |
boolean |
isDone()
|
void |
setDone()
Tell the status object that a task is now done. |
void |
setRunning()
Tell the status object that a task is now running. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TaskExecutorStatus()
Method Detail |
---|
public boolean isDone()
public void flagForError(TaskRunnable t, Throwable reason)
public boolean hasErrors()
true
if there have been build errors.public Map<TaskRunnable,Throwable> getFailedTasks()
public void addWaiting()
public void setRunning()
public void setDone()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |