Class AbstractRetryStrategy
java.lang.Object
org.apache.flink.testutils.junit.extensions.retry.strategy.AbstractRetryStrategy
- All Implemented Interfaces:
RetryStrategy
- Direct Known Subclasses:
RetryOnExceptionStrategy,RetryOnFailureStrategy
Retry strategy base class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn the next attempt should execute or not.voidStop the following attempts when test succeed or failed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.testutils.junit.extensions.retry.strategy.RetryStrategy
handleException
-
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:RetryStrategyReturn the next attempt should execute or not.- Specified by:
hasNextAttemptin interfaceRetryStrategy
-
stopFollowingAttempts
public void stopFollowingAttempts()Description copied from interface:RetryStrategyStop the following attempts when test succeed or failed.- Specified by:
stopFollowingAttemptsin interfaceRetryStrategy
-