Class AbstractRetryStrategy

java.lang.Object
org.apache.flink.testutils.junit.extensions.retry.strategy.AbstractRetryStrategy
All Implemented Interfaces:
RetryStrategy
Direct Known Subclasses:
RetryOnExceptionStrategy, RetryOnFailureStrategy

public abstract class AbstractRetryStrategy extends Object implements RetryStrategy
Retry strategy base class.
  • Field Details

    • totalTimes

      protected final int totalTimes
    • hasNextAttempt

      protected boolean hasNextAttempt
  • Constructor Details

    • AbstractRetryStrategy

      public AbstractRetryStrategy(int totalTimes, boolean hasNextAttempt)
  • Method Details

    • hasNextAttempt

      public boolean hasNextAttempt()
      Description copied from interface: RetryStrategy
      Return the next attempt should execute or not.
      Specified by:
      hasNextAttempt in interface RetryStrategy
    • stopFollowingAttempts

      public void stopFollowingAttempts()
      Description copied from interface: RetryStrategy
      Stop the following attempts when test succeed or failed.
      Specified by:
      stopFollowingAttempts in interface RetryStrategy