cgl.narada.transport.threadpool
Class ThreadPoolManager

java.lang.Object
  extended by cgl.narada.transport.threadpool.ThreadPoolManager

public class ThreadPoolManager
extends Object


Constructor Summary
ThreadPoolManager(int poolSize)
           
 
Method Summary
 int getActiveThreads()
          This method retuns the current number of active threads within the system
 int getThreadPoolSize()
          This method returns the current size of the thread pool
 ThreadPoolWorkerThread getThreadPoolWorkerThread(PoolTCPLink poolTCPLink)
           
 void returnToThreadPool(ThreadPoolWorkerThread worker)
          This method returns an active thread into the list of worker threads that are available for processing.
 void setThreadPoolSize(int newSize)
          This method allows the increase or pruning of the threadpool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPoolManager

public ThreadPoolManager(int poolSize)
Method Detail

setThreadPoolSize

public void setThreadPoolSize(int newSize)
This method allows the increase or pruning of the threadpool


getThreadPoolSize

public int getThreadPoolSize()
This method returns the current size of the thread pool


getActiveThreads

public int getActiveThreads()
This method retuns the current number of active threads within the system


getThreadPoolWorkerThread

public ThreadPoolWorkerThread getThreadPoolWorkerThread(PoolTCPLink poolTCPLink)

returnToThreadPool

public void returnToThreadPool(ThreadPoolWorkerThread worker)
This method returns an active thread into the list of worker threads that are available for processing. Upon return of this worker thread the active thread count is decremented.



For comments and suggestions please send e-mail to The NaradaBrokering Project