org.sourceforge.beanindex.util
Class ThreadPool

java.lang.Object
  extended byorg.sourceforge.beanindex.util.ThreadPool

public class ThreadPool
extends java.lang.Object

Author:
Sakthivel Muthusamy

Constructor Summary
ThreadPool()
           
 
Method Summary
 void disable()
          disable the thread pool.
 void enable()
           
 void run(java.lang.Runnable work)
          Do some work.
 void setMaximumSize(int size)
          sets the maximum limit of this ThreadPool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPool

public ThreadPool()
Method Detail

enable

public void enable()

disable

public void disable()
disable the thread pool. This empties the thread pool stack.


setMaximumSize

public void setMaximumSize(int size)
sets the maximum limit of this ThreadPool

Parameters:
size -

run

public void run(java.lang.Runnable work)
Do some work. This will either create a new thread to do the work, or use an existing idle cached thread.