Class LinearRetry<T>
java.lang.Object
com.oracle.cloud.baremetal.jenkins.retry.LinearRetry<T>
- All Implemented Interfaces:
Retry<T>
-
Constructor Summary
ConstructorsConstructorDescriptionLinearRetry(Callable<T> task) LinearRetry(Callable<T> task, int maxRetries) LinearRetry(Callable<T> task, int maxRetries, Duration retryDelay, Duration retryTimeout) -
Method Summary
-
Constructor Details
-
LinearRetry
-
LinearRetry
-
LinearRetry
- Parameters:
task- Callable that throws exception on errormaxRetries- Positive number of attempts to call task before raising exceptionretryDelay- Time between attemptsretryTimeout- Maximum task execution time after which it is considered failed
-
-
Method Details
-
canRetry
public boolean canRetry()Description copied from interface:RetryCheck that another retry can be attempted. -
run
Description copied from interface:RetryStart attempting to run provided task.
-