protected static class EventProcessor.ProcessingResult extends RetryPolicy
Modifier and Type | Field and Description |
---|---|
static EventProcessor.ProcessingResult |
REGULAR
Instance indicating processing was successful and should proceed normally.
|
Constructor and Description |
---|
EventProcessor.ProcessingResult(RetryPolicy retryPolicy,
Throwable error)
Creates an instance requiring the given
retryPolicy and reporting the given (optional)
error to indicate a failure. |
Modifier and Type | Method and Description |
---|---|
Throwable |
getError()
Returns the exception that caused the processing to fail
|
boolean |
isFailure()
Indicates whether processing failed
|
boolean |
requiresRescheduleEvent()
Indicates whether the scheduler should reschedule the failed event.
|
boolean |
requiresRollback()
Indicates whether the scheduler should rollback the Unit of Work wrapping the event handling.
|
long |
waitTime()
Returns the time the scheduler should wait before continuing processing.
|
proceed, retryAfter, skip
public static final EventProcessor.ProcessingResult REGULAR
public EventProcessor.ProcessingResult(RetryPolicy retryPolicy, Throwable error)
retryPolicy
and reporting the given (optional)
error
to indicate a failure.retryPolicy
- The policy indication how to continue processingerror
- An (optional) error to indicate a failure occurredpublic boolean isFailure()
true
if an error was reported, otherwise false
public Throwable getError()
null
if no failure was reportedpublic long waitTime()
RetryPolicy
RetryPolicy.requiresRescheduleEvent()
returns false
.waitTime
in class RetryPolicy
public boolean requiresRescheduleEvent()
RetryPolicy
requiresRescheduleEvent
in class RetryPolicy
true
if the scheduler should reschedule the failed event, otherwise false
public boolean requiresRollback()
RetryPolicy
requiresRollback
in class RetryPolicy
true
to indicate the scheduler should perform a rollback or false
to request a
commit.Copyright © 2010-2014. All Rights Reserved.