org.apache.geronimo.connector.work.pool
public class: WorkExecutorPoolImpl [javadoc |
source]
java.lang.Object
org.apache.geronimo.connector.work.pool.WorkExecutorPoolImpl
All Implemented Interfaces:
WorkExecutorPool
Based class for WorkExecutorPool. Sub-classes define the synchronization
policy (should the call block until the end of the work; or when it starts
et cetera).
- version:
$
- Rev: 46019 $ $Date: 2004-09-14 02:56:06 -0700 (Tue, 14 Sep 2004) $
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.geronimo.connector.work.pool.WorkExecutorPoolImpl Detail: |
public void execute(Runnable work) throws InterruptedException {
pooledExecutor.execute(work);
}
Execute the specified Work. |
public int getMaximumPoolSize() {
return pooledExecutor.getMaximumPoolSize();
}
Gets the maximum size of this pool. |
public int getPoolSize() {
return pooledExecutor.getPoolSize();
}
Gets the size of this pool. |
public void setMaximumPoolSize(int maxSize) {
pooledExecutor.setMaximumPoolSize(maxSize);
}
Sets the maximum size of this pool. |
public WorkExecutorPool start() {
throw new IllegalStateException("This pooled executor is already started");
}
|
public WorkExecutorPool stop() {
int maxSize = getMaximumPoolSize();
pooledExecutor.shutdownAfterProcessingCurrentlyQueuedTasks();
return new NullWorkExecutorPool(maxSize);
}
Stops this pool. Prior to stop this pool, all the enqueued Work instances
are processed. This is an orderly shutdown. |