public class IntervalRetryScheduler extends AbstractRetryScheduler
|Modifier and Type||Class and Description|
Builder class to instantiate a
|Modifier||Constructor and Description|
|Modifier and Type||Method and Description|
Instantiate a Builder to be able to create a
Compute the amount of milliseconds delay until the next retry, given the information passed.
isExplicitlyNonTransient, scheduleRetry, scheduleRetry
protected IntervalRetryScheduler(IntervalRetryScheduler.Builder builder)
IntervalRetrySchedulerbased on the fields contained in the
Will assert that the
maxRetryCount are positive numbers, and that the
ScheduledExecutorService is not
null. If any of these does not hold, an
AxonConfigurationException will be thrown.
protected long computeRetryInterval(CommandMessage commandMessage, RuntimeException lastFailure, List<Class<? extends Throwable>> failures)
commandMessage- the command that was sent (and failed).
lastFailure- the last failure that caused this retry scheduler to be called.
Listof all failures up to now.
public static IntervalRetryScheduler.Builder builder()
The default for
retryInterval is set to 100ms, while
maxRetryCount gets a single retry.
ScheduledExecutorService is a hard requirement and as such should be provided.
Copyright © 2010–2020. All rights reserved.