org.apache.jcs.utils.threadpool
Class ThreadPool

java.lang.Object
  extended by org.apache.jcs.utils.threadpool.ThreadPool

public class ThreadPool
extends java.lang.Object

This is simply a wrapper around the Pooled Excutor that allows clients to access the queue.

Author:
aaronsm

Constructor Summary
ThreadPool(EDU.oswego.cs.dl.util.concurrent.PooledExecutor pool, EDU.oswego.cs.dl.util.concurrent.Channel queue)
          Create the wrapper.
 
Method Summary
 void execute(java.lang.Runnable run)
          Delegates execution to the pooled executor.
 EDU.oswego.cs.dl.util.concurrent.PooledExecutor getPool()
          This is intended to give the client access to the PooledExecutor itself.
 EDU.oswego.cs.dl.util.concurrent.Channel getQueue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPool

public ThreadPool(EDU.oswego.cs.dl.util.concurrent.PooledExecutor pool,
                  EDU.oswego.cs.dl.util.concurrent.Channel queue)
Create the wrapper.

Parameters:
pool -
queue -
Method Detail

getPool

public EDU.oswego.cs.dl.util.concurrent.PooledExecutor getPool()
This is intended to give the client access to the PooledExecutor itself.

Returns:
Returns the pool.

getQueue

public EDU.oswego.cs.dl.util.concurrent.Channel getQueue()
Returns:
Returns the queue.

execute

public void execute(java.lang.Runnable run)
             throws java.lang.InterruptedException
Delegates execution to the pooled executor.

Parameters:
run -
Throws:
java.lang.InterruptedException


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.