Class RetryableAction<T>
- java.lang.Object
-
- software.amazon.awssdk.testutils.retry.RetryableAction<T>
-
public final class RetryableAction<T> extends Object
Utility to repeatedly invoke an action that returns a result until it succeeds or the max allowed attempts is reached. All Exceptions except for those wrapped inNonRetryableExceptionare retried. Only errors wrapped inRetryableErrorare retried.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TdoRetryableAction(Callable<T> callable, RetryableParams params)Static method to repeatedly call action until it succeeds or the max allowed attempts is reached.
-
-
-
Method Detail
-
doRetryableAction
public static <T> T doRetryableAction(Callable<T> callable, RetryableParams params) throws Exception
Static method to repeatedly call action until it succeeds or the max allowed attempts is reached.- Parameters:
callable- Callable implementing assertion logicparams- Retry related parameters- Returns:
- Successful result
- Throws:
Exception
-
-