Class 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 Details

    • Builder

      public Builder()
  • Method Details

    • retryInterval

      public IntervalRetryScheduler.Builder retryInterval(int 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 - an int specifying the retry interval in milliseconds at which to schedule a retry
      Returns:
      the current Builder instance, for fluent interfacing
    • build

      public IntervalRetryScheduler build()
      Initializes a IntervalRetryScheduler as specified through this Builder.
      Returns:
      a IntervalRetryScheduler as specified through this Builder