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
Class BlockingMode

    java.lang.Object
      org.jboss.util.threadpool.BlockingMode

All Implemented Interfaces:
  Serializable

public class BlockingMode
extends Object
implements Serializable

A type-safe enum for the BasicThreadPool blocking mode.

Version:
  $Revision: 1.1 $
Author:
  Scott.Stark@jboss.org
See Also:
  Serialized Form

Field Summary
`static BlockingMode` | `ABORT` Set the policy for blocked execution to be to throw an AbortWhenBlocked (a subclass of RuntimeException).
`static int` | `ABORT_TYPE`
`static BlockingMode` | `DISCARD` Set the policy for blocked execution to be to return without executing the request.
`static BlockingMode` | `DISCARD_OLDEST` Set the policy for blocked execution to be to discard the oldest unhandled request
`static int` | `DISCARD_OLDEST_TYPE`
`static int` | `DISCARD_TYPE`
`static BlockingMode` | `RUN` Set the policy for blocked execution to be that the current thread executes the command if there are no available threads in the pool.
`static int` | `RUN_TYPE`
`static BlockingMode` | `WAIT` Set the policy for blocked execution to be to wait until a thread is available, unless the pool has been shut down, in which case the action is discarded.
`static int` | `WAIT_TYPE`

Method Summary
`static BlockingMode` | `toBlockingMode(String name)` A utility method to convert a string name to a BlockingMode
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### RUN_TYPE

    public static final int RUN_TYPE

See Also:
  Constant Field Values

### WAIT_TYPE

    public static final int WAIT_TYPE

See Also:
  Constant Field Values

### DISCARD_TYPE

    public static final int DISCARD_TYPE

See Also:
  Constant Field Values

### DISCARD_OLDEST_TYPE

    public static final int DISCARD_OLDEST_TYPE

See Also:
  Constant Field Values

### ABORT_TYPE

    public static final int ABORT_TYPE

See Also:
  Constant Field Values

### RUN

    public static final BlockingMode RUN

  Set the policy for blocked execution to be that the current thread executes the command if there are no available threads in the pool.

### WAIT

    public static final BlockingMode WAIT

  Set the policy for blocked execution to be to wait until a thread is available, unless the pool has been shut down, in which case the action is discarded.

### DISCARD

    public static final BlockingMode DISCARD

  Set the policy for blocked execution to be to return without executing the request.

### DISCARD_OLDEST

    public static final BlockingMode DISCARD_OLDEST

  Set the policy for blocked execution to be to discard the oldest unhandled request

### ABORT

    public static final BlockingMode ABORT

  Set the policy for blocked execution to be to throw an AbortWhenBlocked (a subclass of RuntimeException).

Method Detail

### toBlockingMode

    public static final BlockingMode toBlockingMode(String name)

  A utility method to convert a string name to a BlockingMode

  Parameters:
    `name` -
  Returns:
    The associated BlockingMode constant if name is valid, null otherwise

### toString

    public String toString()

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.