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

Method Summary
 void abortBusyWorker()
           
 void dispatchJob(Job job)
           
 int getBusyWorkerCount()
           
 WorkerThread getFreeWorker()
           
 void initialize()
           
 void returnWorker(WorkerThread pWorker)
           
 void setSize(int pSize)
           
 void shutdown()
           
 WorkerThread waitForFreeWorker()
           
 

Method Detail

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.