public class Retry extends Object
| Constructor and Description |
|---|
Retry(long maxRetries,
long startWait,
long waitIncrement,
long maxWait) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRetry() |
boolean |
hasRetried() |
long |
retriesCompleted() |
protected void |
sleep(long wait) |
void |
useRetry() |
void |
waitForNextAttempt() |
public Retry(long maxRetries,
long startWait,
long waitIncrement,
long maxWait)
maxRetries - Maximum times to retrystartWait - The amount of time (ms) to wait for the initial retrymaxWait - The maximum wait (ms)waitIncrement - The amount of time (ms) to increment next wait time bypublic boolean canRetry()
public void useRetry()
public boolean hasRetried()
public long retriesCompleted()
public void waitForNextAttempt()
throws InterruptedException
InterruptedExceptionprotected void sleep(long wait)
throws InterruptedException
InterruptedExceptionCopyright © 2011–2016 The Apache Software Foundation. All rights reserved.