de.phleisch.app.itsucks.core
Interface WorkerPool
- All Known Implementing Classes:
- WorkerPoolImpl
public interface WorkerPool
The worker pool manages a pool of worker threads.
Every worker can be assigned one or multiple jobs. This assignment controls the Worker Pool
with the dispatchJob method.
The worker pool is used by the dispatcher.
- Author:
- olli
initialize
void initialize()
shutdown
void shutdown()
setSize
void setSize(int pSize)
getFreeWorker
WorkerThread getFreeWorker()
returnWorker
void returnWorker(WorkerThread pWorker)
waitForFreeWorker
WorkerThread waitForFreeWorker()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
dispatchJob
void dispatchJob(Job job)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
getBusyWorkerCount
int getBusyWorkerCount()
abortBusyWorker
void abortBusyWorker()
Copyright © 2010. All Rights Reserved.