public abstract class RetryPolicy extends Object
proceed() will tell the scheduler to ignore the failure and continue
 processing. This policy can be used to indicate sufficient recovery or retrying has been done, or that the error
 cannot be recovered from, and should be ignored.skip() will rollback the Unit of Work and proceed with the next event, effectively skipping the
 events.retryAfter(int, java.util.concurrent.TimeUnit) tells the scheduler to roll back the current
 Unit of Work and process it again after the given amount of time. All Event Listeners will receive the event
 again.| Constructor and Description | 
|---|
| RetryPolicy() | 
| Modifier and Type | Method and Description | 
|---|---|
| static RetryPolicy | proceed()Tells the scheduler to ignore the failure continue processing. | 
| abstract boolean | requiresRescheduleEvent()Indicates whether the scheduler should reschedule the failed event. | 
| abstract boolean | requiresRollback()Indicates whether the scheduler should rollback the Unit of Work wrapping the event handling. | 
| static RetryPolicy | retryAfter(int timeout,
          TimeUnit unit)This policy will roll back the Unit of Work (and the transaction), if any) and reschedule the event for
 processing. | 
| static RetryPolicy | skip()This policy will roll back the Unit of Work (and the transaction) and skip the event altogether. | 
| abstract long | waitTime()Returns the time the scheduler should wait before continuing processing. | 
public static RetryPolicy proceed()
public static RetryPolicy skip()
public static RetryPolicy retryAfter(int timeout, TimeUnit unit)
timeout - The amount of time to wait before retryingunit - The unit of time for the timeoutpublic abstract long waitTime()
requiresRescheduleEvent() returns false.public abstract boolean requiresRescheduleEvent()
true if the scheduler should reschedule the failed event, otherwise falsepublic abstract boolean requiresRollback()
true to indicate the scheduler should perform a rollback or false to request a
         commit.Copyright © 2010-2014. All Rights Reserved.