JobSource
callback interface. If there is at least one job in queue manager assigns it to worker. If not then worker goes to rest until manager has something to assign. Worker manager uses instance of WorkerThreadFactoryIF
specified on creation to create new worker threads. Client application should use it to create and initialize task-specific workers, which will be started as independent threads.
It's possible to tune number of threads working at a given time using setWorkerThreads(int)
method call. Right after the number of threads will change manager will stop unnecessary threads (only after running task completion) or create new worker threads.
|
|