public class RetryStats extends Object
| Constructor and Description |
|---|
RetryStats(RetryPolicy retryPolicy) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRetryOn(Throwable failure)
Records a failed attempt, adjusts the wait time and returns whether a retry can be performed for the
failure. |
boolean |
canRetryWhen(Object result)
Records a failed attempt, adjusts the wait time and returns whether a retry can be performed for the
result
. |
boolean |
canRetryWhen(Object result,
Throwable failure)
Records a failed attempt, adjusts the wait time and returns whether a retry can be performed for the
result
and failure. |
int |
getRetryCount()
Gets the number of retries that have been attempted so far.
|
long |
getWaitTime()
Returns the wait time in nanoseconds.
|
public RetryStats(RetryPolicy retryPolicy)
public boolean canRetryOn(Throwable failure)
failure.public boolean canRetryWhen(Object result)
result
.public boolean canRetryWhen(Object result, Throwable failure)
result
and failure.public int getRetryCount()
public long getWaitTime()
Copyright © 2015. All Rights Reserved.