org.axonframework.eventhandling
Enum RetryPolicy

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

public enum RetryPolicy
extends Enum<RetryPolicy>

This policy tells the EventProcessingScheduler how it should deal with failed transactions.

Since:
0.4
Author:
Allard Buijze

Enum Constant Summary
RETRY_LAST_EVENT
          Tells the scheduler to only offer the last event form this transaction to the event listener.
RETRY_TRANSACTION
          Tells the scheduler to offer all the events in the failed transaction to the event listener in a new transaction.
SKIP_FAILED_EVENT
          Tells the scheduler to ignore the failure and schedule a new transaction to continue processing.
 
Method Summary
static RetryPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RetryPolicy[] 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

SKIP_FAILED_EVENT

public static final RetryPolicy SKIP_FAILED_EVENT
Tells the scheduler to ignore the failure and schedule a new transaction to continue processing. Note that any retry interval is ignored, and a new transaction is scheduled for immediate execution when this retry policy is applied.


RETRY_TRANSACTION

public static final RetryPolicy RETRY_TRANSACTION
Tells the scheduler to offer all the events in the failed transaction to the event listener in a new transaction.


RETRY_LAST_EVENT

public static final RetryPolicy RETRY_LAST_EVENT
Tells the scheduler to only offer the last event form this transaction to the event listener. This event will be handled in a new transaction.

Method Detail

values

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

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

valueOf

public static RetryPolicy 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.