Class ExponentialBackOffIntervalRetryScheduler.Builder
java.lang.Object
org.axonframework.commandhandling.gateway.AbstractRetryScheduler.Builder<ExponentialBackOffIntervalRetryScheduler.Builder>
org.axonframework.commandhandling.gateway.ExponentialBackOffIntervalRetryScheduler.Builder
- Enclosing class:
ExponentialBackOffIntervalRetryScheduler
public static class ExponentialBackOffIntervalRetryScheduler.Builder
extends AbstractRetryScheduler.Builder<ExponentialBackOffIntervalRetryScheduler.Builder>
Builder class to instantiate an
ExponentialBackOffIntervalRetryScheduler.
The default for maxRetryCount is set to a single retry, the backoffFactor defaults to 100ms
and the nonTransientFailurePredicate defaults to AxonNonTransientExceptionClassesPredicate.
The ScheduledExecutorService is a hard requirement and as such should be provided.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbackoffFactor(long backoffFactor) Sets the backoff factor in milliseconds at which to schedule a retry.build()Initializes aExponentialBackOffIntervalRetryScheduleras specified through this Builder.Methods inherited from class org.axonframework.commandhandling.gateway.AbstractRetryScheduler.Builder
addNonTransientFailurePredicate, addNonTransientFailurePredicate, maxRetryCount, nonTransientFailurePredicate, nonTransientFailurePredicate, retryExecutor, validate
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
backoffFactor
Sets the backoff factor in milliseconds at which to schedule a retry. This field defaults to 100ms and is required to be a positive number.- Parameters:
backoffFactor- anintspecifying the interval in milliseconds at which to schedule a retry- Returns:
- the current Builder instance, for fluent interfacing
-
build
Initializes aExponentialBackOffIntervalRetryScheduleras specified through this Builder.- Returns:
- a
ExponentialBackOffIntervalRetryScheduleras specified through this Builder
-