|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.commandhandling.disruptor.BlacklistDetectingCallback<R>
R
- The return value of the Commandpublic class BlacklistDetectingCallback<R>
Wrapper for command handler Callbacks that detects blacklisted aggregates and starts a cleanup process when an aggregate is blacklisted.
Constructor Summary | |
---|---|
BlacklistDetectingCallback(CommandCallback<R> delegate,
CommandMessage command,
com.lmax.disruptor.RingBuffer<CommandHandlingEntry> ringBuffer,
DisruptorCommandBus commandBus,
boolean rescheduleOnCorruptState)
Initializes the callback which allows the given command to be rescheduled on the given
ringBuffer if it failed due to a corrupt state. |
Method Summary | |
---|---|
boolean |
hasDelegate()
Indicates whether this callback has a delegate that needs to be notified of the command handling result |
void |
onFailure(Throwable cause)
Invoked when command handling execution resulted in an error. |
void |
onSuccess(R result)
Invoked when command handling execution was successful. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlacklistDetectingCallback(CommandCallback<R> delegate, CommandMessage command, com.lmax.disruptor.RingBuffer<CommandHandlingEntry> ringBuffer, DisruptorCommandBus commandBus, boolean rescheduleOnCorruptState)
command
to be rescheduled on the given
ringBuffer
if it failed due to a corrupt state.
delegate
- The callback to invoke when an exception occurredcommand
- The command being executedringBuffer
- The RingBuffer on which an Aggregate Cleanup should be scheduled when a
corrupted
aggregate state was detectedcommandBus
- The CommandBus on which the command should be rescheduled if it was executed on
a
corrupt aggregaterescheduleOnCorruptState
- Whether the command should be retried if it has been executed against corrupt
stateMethod Detail |
---|
public void onSuccess(R result)
CommandCallback
onSuccess
in interface CommandCallback<R>
result
- The result of the command handling execution, if any.public void onFailure(Throwable cause)
CommandCallback
onFailure
in interface CommandCallback<R>
cause
- The exception raised during command handlingpublic boolean hasDelegate()
true
if this callback has a delegate, otherwise false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |