|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.eventhandling.async.RetryPolicy
public abstract class RetryPolicy
This policy tells the EventProcessor how it should deal with failed transactions.
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(long, 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 Summary | |
---|---|
RetryPolicy()
|
Method Summary | |
---|---|
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(long 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RetryPolicy()
Method Detail |
---|
public static RetryPolicy proceed()
public static RetryPolicy skip()
public static RetryPolicy retryAfter(long timeout, TimeUnit unit)
timeout
- The amount of time to wait before retryingunit
- The unit of time for the timeout
public abstract long waitTime()
requiresRescheduleEvent()
returns false
.
public abstract boolean requiresRescheduleEvent()
true
if the scheduler should reschedule the failed event, otherwise false
public abstract boolean requiresRollback()
true
to indicate the scheduler should perform a rollback or false
to request a
commit.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |