com.ch.odi.parallel
Class ParallelScheduler
java.lang.Object
|
+--com.ch.odi.parallel.ParallelScheduler
- public class ParallelScheduler
- extends Object
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ParallelScheduler
public ParallelScheduler(JobFactory jf)
- Creates a new Scheduler that uses the specified factory to produce jobs.
The thread limit (setMaxThreads) is set to 1.
ParallelScheduler
public ParallelScheduler(JobFactory jf,
int maxThreads)
- Creates a new Scheduler that uses the specified factory to produce jobs.
Specifies a limit for the maximum number of threads running.
setMaxThreads
public void setMaxThreads(int maxThreads)
- Sets the maximum number of threads that are running at the same time.
notifyJobEnd
public void notifyJobEnd(ParallelJob job)
- Called by the ParallelJob class to notify this scheduler that a thread
has ended.
addSchedulerListener
public void addSchedulerListener(SchedulerListener listener)
removeSchedulerListener
public void removeSchedulerListener(SchedulerListener listener)
run
public void run()
- Starts the scheduler.