Class IntervalRetryScheduler.Builder
java.lang.Object
org.axonframework.commandhandling.gateway.AbstractRetryScheduler.Builder<IntervalRetryScheduler.Builder>
org.axonframework.commandhandling.gateway.IntervalRetryScheduler.Builder
- Enclosing class:
IntervalRetryScheduler
public static class IntervalRetryScheduler.Builder
extends AbstractRetryScheduler.Builder<IntervalRetryScheduler.Builder>
Builder class to instantiate a
IntervalRetryScheduler.
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 TypeMethodDescriptionbuild()Initializes aIntervalRetryScheduleras specified through this Builder.retryInterval(int retryInterval) Sets the retry interval in milliseconds at which to schedule a retry.Methods inherited from class org.axonframework.commandhandling.gateway.AbstractRetryScheduler.Builder
addNonTransientFailurePredicate, addNonTransientFailurePredicate, maxRetryCount, nonTransientFailurePredicate, nonTransientFailurePredicate, retryExecutor, validate
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
retryInterval
Sets the retry interval in milliseconds at which to schedule a retry. This field defaults to 100ms and is required to be a positive number.- Parameters:
retryInterval- anintspecifying the retry interval in milliseconds at which to schedule a retry- Returns:
- the current Builder instance, for fluent interfacing
-
build
Initializes aIntervalRetryScheduleras specified through this Builder.- Returns:
- a
IntervalRetryScheduleras specified through this Builder
-