Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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