|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sling.testing.tools.retry.RetryLoop
public class RetryLoop
Convenience class for retrying tests until timeout or success.
| Nested Class Summary | |
|---|---|
static interface |
RetryLoop.Condition
Interface for conditions to check, isTrue will be called repeatedly until success or timeout |
| Constructor Summary | |
|---|---|
RetryLoop(RetryLoop.Condition c,
int timeoutSeconds,
int intervalBetweenTriesMsec)
Retry Condition c until it returns true or timeout. |
|
| Method Summary | |
|---|---|
protected long |
getRemainingTimeSeconds()
|
protected void |
onTimeout()
Called if the loop times out without success, just before failing |
protected void |
reportException(java.lang.Throwable t)
Can be overridden to report Exceptions that happen in the retry loop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RetryLoop(RetryLoop.Condition c,
int timeoutSeconds,
int intervalBetweenTriesMsec)
RetryLoop.Condition
for isTrue semantics.
| Method Detail |
|---|
protected void reportException(java.lang.Throwable t)
protected void onTimeout()
protected long getRemainingTimeSeconds()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||