de.phleisch.app.itsucks.core.impl
Class WorkerPoolImpl
java.lang.Object
de.phleisch.app.itsucks.core.impl.WorkerPoolImpl
- All Implemented Interfaces:
- WorkerPool
public class WorkerPoolImpl
- extends java.lang.Object
- implements WorkerPool
Default implementation of the WorkerPool.
- Author:
- olli
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WorkerPoolImpl
public WorkerPoolImpl()
WorkerPoolImpl
public WorkerPoolImpl(int pSize)
initialize
public void initialize()
- Specified by:
initialize in interface WorkerPool
shutdown
public void shutdown()
- Specified by:
shutdown in interface WorkerPool
setSize
public void setSize(int pSize)
- Specified by:
setSize in interface WorkerPool
getFreeWorker
public WorkerThread getFreeWorker()
- Specified by:
getFreeWorker in interface WorkerPool
returnWorker
public void returnWorker(WorkerThread pWorker)
- Specified by:
returnWorker in interface WorkerPool
waitForFreeWorker
public WorkerThread waitForFreeWorker()
throws java.lang.InterruptedException
- Specified by:
waitForFreeWorker in interface WorkerPool
- Throws:
java.lang.InterruptedException
dispatchJob
public void dispatchJob(Job job)
throws java.lang.InterruptedException
- Specified by:
dispatchJob in interface WorkerPool
- Throws:
java.lang.InterruptedException
getBusyWorkerCount
public int getBusyWorkerCount()
- Specified by:
getBusyWorkerCount in interface WorkerPool
abortBusyWorker
public void abortBusyWorker()
- Specified by:
abortBusyWorker in interface WorkerPool
Copyright © 2010. All Rights Reserved.