public class RetryHandler extends Object
Retryable
interface) and executes that with possibility to
retry the execution in case of IOException.Constructor and Description |
---|
RetryHandler(int retriesAllowed,
Task task)
Create a new RetryingHandler.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(Retryable exe,
String desc)
Execute the
Retryable code with specified number of retries. |
public RetryHandler(int retriesAllowed, Task task)
retriesAllowed
- how many times to retrytask
- the Ant task that is is executed from, used for logging onlypublic void execute(Retryable exe, String desc) throws IOException
Retryable
code with specified number of retries.exe
- the code to executedesc
- some descriptive text for this piece of code, used for loggingIOException
- if the number of retries has exceeded the allowed limit