org.apache.jcs.utils.threadpool
Enum PoolConfiguration.WhenBlockedPolicy

java.lang.Object
  extended by java.lang.Enum<PoolConfiguration.WhenBlockedPolicy>
      extended by org.apache.jcs.utils.threadpool.PoolConfiguration.WhenBlockedPolicy
All Implemented Interfaces:
Serializable, Comparable<PoolConfiguration.WhenBlockedPolicy>
Enclosing class:
PoolConfiguration

public static enum PoolConfiguration.WhenBlockedPolicy
extends Enum<PoolConfiguration.WhenBlockedPolicy>


Enum Constant Summary
ABORT
          abort when queue is full and max threads is reached.
BLOCK
          block when queue is full and max threads is reached.
DISCARDOLDEST
          discard oldest when queue is full and max threads is reached.
RUN
          run in current thread when queue is full and max threads is reached.
WAIT
          wait when queue is full and max threads is reached.
 
Method Summary
static PoolConfiguration.WhenBlockedPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PoolConfiguration.WhenBlockedPolicy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ABORT

public static final PoolConfiguration.WhenBlockedPolicy ABORT
abort when queue is full and max threads is reached.


BLOCK

public static final PoolConfiguration.WhenBlockedPolicy BLOCK
block when queue is full and max threads is reached.


RUN

public static final PoolConfiguration.WhenBlockedPolicy RUN
run in current thread when queue is full and max threads is reached.


WAIT

public static final PoolConfiguration.WhenBlockedPolicy WAIT
wait when queue is full and max threads is reached.


DISCARDOLDEST

public static final PoolConfiguration.WhenBlockedPolicy DISCARDOLDEST
discard oldest when queue is full and max threads is reached.

Method Detail

values

public static PoolConfiguration.WhenBlockedPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PoolConfiguration.WhenBlockedPolicy c : PoolConfiguration.WhenBlockedPolicy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PoolConfiguration.WhenBlockedPolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.