Class AbstractRetryBlock<P,E extends Throwable>

java.lang.Object
com.sdl.delivery.retry.AbstractRetryBlock<P,E>
Type Parameters:
P - parameter type
E - exception type
Direct Known Subclasses:
ConsumerRetryBlock, FunctionRetryBlock

public abstract class AbstractRetryBlock<P,E extends Throwable> extends Object
Abstract class for retry block functionality.
  • Constructor Details

    • AbstractRetryBlock

      public AbstractRetryBlock(Supplier<P> propertyProvider, int maxRetryCount, int attemptDelayFactor)
    • AbstractRetryBlock

      public AbstractRetryBlock(Supplier<P> propertyProvider)
  • Method Details

    • retryIfNecessary

      protected void retryIfNecessary(E e, String msg) throws E
      Throws:
      E extends Throwable
    • getPropertyProvider

      protected Supplier<P> getPropertyProvider()
    • getMaxRetryCount

      protected int getMaxRetryCount()
    • getAttempt

      protected int getAttempt()
    • incrementAttempt

      protected void incrementAttempt()