public interface RetryScheduler
|Modifier and Type||Method and Description|
Inspect the given
boolean scheduleRetry(CommandMessage commandMessage, RuntimeException lastFailure, List<Class<? extends Throwable>> failures, Runnable commandDispatch)
commandMessagethat failed with given
lastFailure. The given
failuresprovides a list of previous failures known for this command. The
commandDispatchtask can be used to schedule the command for dispatching. The return value of this method indicates whether the command has been scheduled for a retry. When
true, the original callbacks should not be invoked, as command execution is subject to a retry. When
false, the failure is interpreted as terminal and the callback will be invoked with the last failure recorded. If the implementation throws an Exception, that exception is passed as the failure to the original callback.
commandMessage- The Command Message being dispatched
lastFailure- The last failure recorded for this command
failures- A condensed view of all known failures of this command. Each element in the array represents the cause of the element preceding it.
commandDispatch- The task to be executed to retry a command
trueif the command has been rescheduled, otherwise
Copyright © 2010–2022. All rights reserved.