public class ExponentialBackOffIntervalRetryScheduler extends AbstractRetryScheduler
Modifier and Type | Class and Description |
---|---|
static class |
ExponentialBackOffIntervalRetryScheduler.Builder
Builder class to instantiate an
ExponentialBackOffIntervalRetryScheduler . |
Modifier | Constructor and Description |
---|---|
protected |
ExponentialBackOffIntervalRetryScheduler(ExponentialBackOffIntervalRetryScheduler.Builder builder)
Instantiate an
ExponentialBackOffIntervalRetryScheduler . |
Modifier and Type | Method and Description |
---|---|
static ExponentialBackOffIntervalRetryScheduler.Builder |
builder()
Instantiate a Builder to be able to create a
ExponentialBackOffIntervalRetryScheduler . |
protected long |
computeRetryInterval(CommandMessage commandMessage,
RuntimeException lastFailure,
List<Class<? extends Throwable>[]> failures)
Compute the amount of milliseconds delay until the next retry, given the information passed.
|
isExplicitlyNonTransient, scheduleRetry, scheduleRetry
protected ExponentialBackOffIntervalRetryScheduler(ExponentialBackOffIntervalRetryScheduler.Builder builder)
ExponentialBackOffIntervalRetryScheduler
. the settings are copied from the
ExponentialBackOffIntervalRetryScheduler.Builder
and validated.builder
- public static ExponentialBackOffIntervalRetryScheduler.Builder builder()
ExponentialBackOffIntervalRetryScheduler
.
The default for maxRetryCount
is set to a single retry and the backoffFactor
defaults to 100ms.
The ScheduledExecutorService
is a hard requirement and as such should be provided.
ExponentialBackOffIntervalRetryScheduler
protected long computeRetryInterval(CommandMessage commandMessage, RuntimeException lastFailure, List<Class<? extends Throwable>[]> failures)
AbstractRetryScheduler
computeRetryInterval
in class AbstractRetryScheduler
commandMessage
- the command that was sent (and failed).lastFailure
- the last failure that caused this retry scheduler to be called.failures
- a List
of all failures up to now.Copyright © 2010–2020. All rights reserved.