Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.server.async.scheduling
Enum PooledExecutorService.SaturationPolicy

java.lang.Object
  extended by java.lang.Enum<PooledExecutorService.SaturationPolicy>
      extended by org.jboss.errai.bus.server.async.scheduling.PooledExecutorService.SaturationPolicy
All Implemented Interfaces:
Serializable, Comparable<PooledExecutorService.SaturationPolicy>
Enclosing class:
PooledExecutorService

public static enum PooledExecutorService.SaturationPolicy
extends Enum<PooledExecutorService.SaturationPolicy>

Enumeration of possible ways of handling a queue full scenario.


Enum Constant Summary
CallerRuns
          Runs the task in the calling thread.
Fail
          Throws a RuntimeException when called.
 
Method Summary
static PooledExecutorService.SaturationPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PooledExecutorService.SaturationPolicy[] 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

CallerRuns

public static final PooledExecutorService.SaturationPolicy CallerRuns
Runs the task in the calling thread.


Fail

public static final PooledExecutorService.SaturationPolicy Fail
Throws a RuntimeException when called. The exception message includes task.toString(), so name your runnables if you'd like nice messages in this case.

Method Detail

values

public static PooledExecutorService.SaturationPolicy[] 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 (PooledExecutorService.SaturationPolicy c : PooledExecutorService.SaturationPolicy.values())
    System.out.println(c);

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

valueOf

public static PooledExecutorService.SaturationPolicy 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

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.