View Javadoc

1   package org.jmage.pool;
2   
3   import java.util.Set;
4   
5   /***
6    * WorkerPool
7    */
8   public interface WorkerPool {
9       Worker hireWorker() throws WorkerException;
10  
11      void freeWorker(Worker worker) throws WorkerException;
12  
13      void freeWorkerFor(Object object) throws WorkerException;
14  
15      void addWorker(Worker worker) throws WorkerException;
16  
17      void removeWorker(Worker worker) throws WorkerException;
18  
19      Set getAllWorkers() throws WorkerException;
20  
21      int getTimeoutSeconds() throws WorkerException;
22  
23      void setTimeoutSeconds(int timeoutSeconds) throws WorkerException;
24  }