站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

BasicThreadPoolMBean (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.util.threadpool
Interface BasicThreadPoolMBean

All Superinterfaces:
ThreadPoolMBean
All Known Implementing Classes:
BasicThreadPool

public interface BasicThreadPoolMBean
extends ThreadPoolMBean

Management interface for the thread pool.

Version:
$Revision: 1.3.2.1 $
Author:
Adrian Brock

Method Summary
 BlockingMode getBlockingMode()
           
 long getKeepAliveTime()
          Get the keep alive time
 int getMaximumQueueSize()
          Get the maximum queue size
 int getQueueSize()
          Get the current queue size
 String getThreadGroupName()
          Retrieve the thread group name
 void setBlockingMode(BlockingMode mode)
          Set the behavior of the pool when a task is added and the queue is full.
 void setKeepAliveTime(long time)
          Set the keep alive time
 void setMaximumQueueSize(int size)
          Set the maximum queue size
 void setThreadGroupName(String threadGroupName)
          Set the thread group name
 
Methods inherited from interface org.jboss.util.threadpool.ThreadPoolMBean
getInstance, getMaximumPoolSize, getMinimumPoolSize, getName, getPoolNumber, setMaximumPoolSize, setMinimumPoolSize, setName, stop
 

Method Detail

getQueueSize

public int getQueueSize()
Get the current queue size

Returns:
the queue size

getMaximumQueueSize

public int getMaximumQueueSize()
Get the maximum queue size

Returns:
the maximum queue size

setMaximumQueueSize

public void setMaximumQueueSize(int size)
Set the maximum queue size

Parameters:
size - the new maximum queue size

getBlockingMode

public BlockingMode getBlockingMode()
Returns:
the blocking mode

setBlockingMode

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

Parameters:
mode - one of run, wait, discard, discardOldest or abort without regard to case.

getThreadGroupName

public String getThreadGroupName()
Retrieve the thread group name

Returns:
the thread group name

setThreadGroupName

public void setThreadGroupName(String threadGroupName)
Set the thread group name

Parameters:
threadGroupName - - the thread group name

getKeepAliveTime

public long getKeepAliveTime()
Get the keep alive time

Returns:
the keep alive time

setKeepAliveTime

public void setKeepAliveTime(long time)
Set the keep alive time

Parameters:
time - the keep alive time


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.