public class BlockingMode
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
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 |
private java.lang.String |
name
The string form of the enum
|
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 |
private static long |
serialVersionUID |
private int |
type
The enum manifest constant
|
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 |
| Modifier | Constructor and Description |
|---|---|
private |
BlockingMode(java.lang.String name,
int type) |
| Modifier and Type | Method and Description |
|---|---|
(package private) java.lang.Object |
readResolve()
Overriden to return the indentity instance of BlockingMode based on the
stream type int value.
|
static BlockingMode |
toBlockingMode(java.lang.String name)
A utility method to convert a string name to a BlockingMode
|
java.lang.String |
toString() |
private static final long serialVersionUID
public static final int RUN_TYPE
public static final int WAIT_TYPE
public static final int DISCARD_TYPE
public static final int DISCARD_OLDEST_TYPE
public static final int ABORT_TYPE
public static final BlockingMode RUN
public static final BlockingMode WAIT
public static final BlockingMode DISCARD
public static final BlockingMode DISCARD_OLDEST
public static final BlockingMode ABORT
private final transient java.lang.String name
private final int type
public static final BlockingMode toBlockingMode(java.lang.String name)
name - public java.lang.String toString()
toString in class java.lang.Objectjava.lang.Object readResolve()
throws java.io.ObjectStreamException
java.io.ObjectStreamException