org.axonframework.eventhandling
Enum YieldPolicy

java.lang.Object
  extended by java.lang.Enum<YieldPolicy>
      extended by org.axonframework.eventhandling.YieldPolicy
All Implemented Interfaces:
Serializable, Comparable<YieldPolicy>

public enum YieldPolicy
extends Enum<YieldPolicy>

The yielding policy for transactions. This policy tells the EventProcessingScheduler what to do when a transaction is finished.

Since:
0.3
Author:
Allard Buijze

Enum Constant Summary
DO_NOT_YIELD
          Continue event processing in the same thread.
YIELD_AFTER_TRANSACTION
          Tells the scheduler to yield to other threads (if possible) after ending the current transaction.
 
Method Summary
static YieldPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static YieldPolicy[] 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

DO_NOT_YIELD

public static final YieldPolicy DO_NOT_YIELD
Continue event processing in the same thread. This option can be used for event listeners that need high-priority event processing. The scheduler will immediately continue processing events in a next transaction.


YIELD_AFTER_TRANSACTION

public static final YieldPolicy YIELD_AFTER_TRANSACTION
Tells the scheduler to yield to other threads (if possible) after ending the current transaction.

Method Detail

values

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

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

valueOf

public static YieldPolicy 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 © 2011. All Rights Reserved.