R
- The return value of the Commandpublic class BlacklistDetectingCallback<R> extends Object implements CommandCallback<R>
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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.
|
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
statepublic 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
.Copyright © 2010-2014. All Rights Reserved.