in src/main/java/com/amazonaws/services/simpleworkflow/flow/retry/Retrier.java [52:83]
public void retry(Runnable r) {
int attempt = 0;
long startTime = System.currentTimeMillis();
BackoffThrottler throttler = createBackoffThrottler();
boolean success = false;
do {
try {
attempt++;
throttler.throttle();
r.run();
success = true;
throttler.success();
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
return;
}
catch (RuntimeException e) {
throttler.failure();
if (!shouldRetry(e)) {
throw e;
}
long elapsed = System.currentTimeMillis() - startTime;
if (attempt > retryParameters.getMaximumRetries()
|| (elapsed >= retryParameters.getExpirationInterval() && attempt > retryParameters.getMinimumRetries())) {
throw e;
}
logger.warn("Retrying after failure", e);
}
}
while (!success);
}