Save This Page
Home » JBoss-5.1.0 » org » jboss » util » threadpool » [javadoc | source]
public interface: BasicThreadPoolMBean [javadoc | source]

All Implemented Interfaces:

All Known Implementing Classes:

Management interface for the thread pool.
Method from org.jboss.util.threadpool.BasicThreadPoolMBean Summary:
getBlockingMode,   getClassLoaderSource,   getKeepAliveTime,   getMaximumQueueSize,   getQueueSize,   getThreadGroupName,   setBlockingMode,   setClassLoaderSource,   setKeepAliveTime,   setMaximumQueueSize,   setThreadGroupName
Method from org.jboss.util.threadpool.BasicThreadPoolMBean Detail:
 public BlockingMode getBlockingMode()
 public ClassLoaderSource getClassLoaderSource()
 public long getKeepAliveTime()
    Get the keep alive time
 public int getMaximumQueueSize()
    Get the maximum queue size
 public int getQueueSize()
    Get the current queue size
 public String getThreadGroupName()
    Retrieve the thread group name
 public  void setBlockingMode(BlockingMode mode)
    Set the behavior of the pool when a task is added and the queue is full. The mode string indicates one of the following modes: abort - a RuntimeException is thrown run - the calling thread executes the task wait - the calling thread blocks until the queue has room discard - the task is silently discarded without being run discardOldest - check to see if a task is about to complete and enque the new task if possible, else run the task in the calling thread
 public  void setClassLoaderSource(ClassLoaderSource classLoaderSource)
    Sets the source of the classloader that will be set as the thread context classloader for pool threads. If set, whenever any new pool thread is created, it's context classloader will be set to the loader provided by this source. Further, when any thread is returned to the pool, its context classloader will be reset to the loader provided by this source.

    If set to null (the default), the pool will not attempt to manage the context classloader for pool threads; instead a newly created pool thread will inherit its context classloader from whatever thread triggered the addition to the pool. A thread returned to the pool will not have its context classloader changed from whatever it was.

 public  void setKeepAliveTime(long time)
    Set the keep alive time
 public  void setMaximumQueueSize(int size)
    Set the maximum queue size
 public  void setThreadGroupName(String threadGroupName)
    Set the thread group name