Class LinearRetry<T>
- java.lang.Object
-
- com.oracle.cloud.baremetal.jenkins.retry.LinearRetry<T>
-
-
Constructor Summary
Constructors Constructor Description LinearRetry(Callable<T> task)
LinearRetry(Callable<T> task, int maxRetries)
LinearRetry(Callable<T> task, int maxRetries, Duration retryDelay, Duration retryTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRetry()
Check that another retry can be attempted.T
run()
Start attempting to run provided task.
-
-
-
Constructor Detail
-
LinearRetry
public LinearRetry(Callable<T> task, int maxRetries, Duration retryDelay, Duration retryTimeout)
- 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 Detail
-
canRetry
public boolean canRetry()
Description copied from interface:Retry
Check that another retry can be attempted.- Specified by:
canRetry
in interfaceRetry<T>
- Returns:
- true, if another retry is possible
- See Also:
Retry.canRetry()
-
-