public class RetryLoop extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
RetryLoop.Condition
Interface for conditions to check, isTrue will be called
repeatedly until success or timeout
|
Constructor and Description |
---|
RetryLoop(RetryLoop.Condition c,
int timeoutSeconds,
int intervalBetweenTriesMsec)
Retry Condition c until it returns true or timeout.
|
Modifier and Type | Method and Description |
---|---|
protected long |
getRemainingTimeSeconds() |
protected void |
onTimeout()
Called if the loop times out without success, just before failing
|
protected void |
reportException(Throwable t)
Can be overridden to report Exceptions that happen in the retry loop
|
public RetryLoop(RetryLoop.Condition c, int timeoutSeconds, int intervalBetweenTriesMsec)
RetryLoop.Condition
for isTrue semantics.protected void reportException(Throwable t)
protected void onTimeout()
protected long getRemainingTimeSeconds()
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.