org.apache.camel
Enum ThreadPoolRejectedPolicy

java.lang.Object
  extended by java.lang.Enum<ThreadPoolRejectedPolicy>
      extended by org.apache.camel.ThreadPoolRejectedPolicy
All Implemented Interfaces:
Serializable, Comparable<ThreadPoolRejectedPolicy>

public enum ThreadPoolRejectedPolicy
extends Enum<ThreadPoolRejectedPolicy>

Represent the kinds of options for rejection handlers for thread pools.

These options are used for fine grained thread pool settings, where you want to control which handler to use when a thread pool cannot execute a new task.

Camel will by default use CallerRuns.

Version:
$Revision: 18375 $

Enum Constant Summary
Abort
           
CallerRuns
           
Discard
           
DiscardOldest
           
 
Method Summary
 RejectedExecutionHandler asRejectedExecutionHandler()
           
static ThreadPoolRejectedPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ThreadPoolRejectedPolicy[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Abort

public static final ThreadPoolRejectedPolicy Abort

CallerRuns

public static final ThreadPoolRejectedPolicy CallerRuns

DiscardOldest

public static final ThreadPoolRejectedPolicy DiscardOldest

Discard

public static final ThreadPoolRejectedPolicy Discard
Method Detail

values

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

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

valueOf

public static ThreadPoolRejectedPolicy 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

asRejectedExecutionHandler

public RejectedExecutionHandler asRejectedExecutionHandler()


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.