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 Summary
Fields Modifier and Type Field Description protected boolean
hasNextAttempt
protected int
totalTimes
-
Constructor Summary
Constructors Constructor Description AbstractRetryStrategy(int totalTimes, boolean hasNextAttempt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNextAttempt()
Return the next attempt should execute or not.void
stopFollowingAttempts()
Stop 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, wait
-
Methods inherited from interface org.apache.flink.testutils.junit.extensions.retry.strategy.RetryStrategy
handleException
-
-
-
-
Method Detail
-
hasNextAttempt
public boolean hasNextAttempt()
Description copied from interface:RetryStrategy
Return the next attempt should execute or not.- Specified by:
hasNextAttempt
in interfaceRetryStrategy
-
stopFollowingAttempts
public void stopFollowingAttempts()
Description copied from interface:RetryStrategy
Stop the following attempts when test succeed or failed.- Specified by:
stopFollowingAttempts
in interfaceRetryStrategy
-
-