@InterfaceAudience.Public @InterfaceStability.Evolving public class JobControl extends Object implements Runnable
限定符和类型 | 类和说明 |
---|---|
static class |
JobControl.ThreadState |
构造器和说明 |
---|
JobControl(String groupName)
Construct a job control for a group of jobs.
|
限定符和类型 | 方法和说明 |
---|---|
String |
addJob(ControlledJob aJob)
Add a new job.
|
void |
addJobCollection(Collection<ControlledJob> jobs)
Add a collection of jobs
|
boolean |
allFinished() |
List<ControlledJob> |
getFailedJobList() |
List<ControlledJob> |
getReadyJobsList() |
List<ControlledJob> |
getRunningJobList() |
List<ControlledJob> |
getSuccessfulJobList() |
JobControl.ThreadState |
getThreadState() |
List<ControlledJob> |
getWaitingJobList() |
void |
resume()
resume the suspended thread
|
void |
run()
The main loop for the thread.
|
void |
stop()
set the thread state to STOPPING so that the
thread will stop when it wakes up.
|
void |
suspend()
suspend the running thread
|
public JobControl(String groupName)
groupName
- a name identifying this grouppublic List<ControlledJob> getWaitingJobList()
public List<ControlledJob> getRunningJobList()
public List<ControlledJob> getReadyJobsList()
public List<ControlledJob> getSuccessfulJobList()
public List<ControlledJob> getFailedJobList()
public String addJob(ControlledJob aJob)
aJob
- the new jobpublic void addJobCollection(Collection<ControlledJob> jobs)
jobs
- public JobControl.ThreadState getThreadState()
public void stop()
public void suspend()
public void resume()
public boolean allFinished()
Copyright © 2009 The Apache Software Foundation