| 程序包 | 说明 |
|---|---|
| com.github.lowzj.retry | |
| com.github.lowzj.retry.attempt | |
| com.github.lowzj.retry.predicate |
| 限定符和类型 | 方法和说明 |
|---|---|
Attempt<?> |
RetryException.getLastFailedAttempt()
Returns the last failed attempt
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
WaitStrategy.computeSleepTime(Attempt failedAttempt)
Returns the time, in milliseconds, to sleep before retrying.
|
void |
RetryListener.onRetry(Attempt<V> attempt)
This method with fire no matter what the result is and before the
rejection predicate and stop strategies are applied.
|
boolean |
StopStrategy.shouldStop(Attempt failedAttempt)
Returns
true if the retryer should stop retrying. |
| 构造器和说明 |
|---|
RetryException(int numberOfFailedAttempts,
Attempt<?> lastFailedAttempt)
If the last
Attempt had an Exception, ensure it is available in
the stack trace. |
RetryException(String message,
int numberOfFailedAttempts,
Attempt<?> lastFailedAttempt)
If the last
Attempt had an Exception, ensure it is available in
the stack trace. |
| 限定符和类型 | 类和说明 |
|---|---|
class |
ExceptionAttempt<R>
Created on 2018/2/11
|
class |
ResultAttempt<R>
Created on 2018/2/11
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
ResultPredicate.test(Attempt<V> attempt) |
boolean |
ExceptionPredicate.test(Attempt<V> attempt) |
boolean |
ExceptionClassPredicate.test(Attempt<V> attempt) |
Copyright © 2018. All rights reserved.