| 程序包 | 说明 |
|---|---|
| cn.aotcloud.retry |
| 限定符和类型 | 方法和说明 |
|---|---|
Attempt<?> |
RetryException.getLastFailedAttempt()
Returns the last failed attempt
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
WaitStrategy.computeSleepTime(Attempt failedAttempt)
Returns the time, in milliseconds, to sleep before retrying.
|
<V> 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. |
| 构造器和说明 |
|---|
Retryer(AttemptTimeLimiter<V> attemptTimeLimiter,
StopStrategy stopStrategy,
WaitStrategy waitStrategy,
BlockStrategy blockStrategy,
com.google.common.base.Predicate<Attempt<V>> rejectionPredicate)
Constructor
|
Retryer(AttemptTimeLimiter<V> attemptTimeLimiter,
StopStrategy stopStrategy,
WaitStrategy waitStrategy,
BlockStrategy blockStrategy,
com.google.common.base.Predicate<Attempt<V>> rejectionPredicate,
Collection<RetryListener> listeners)
Constructor
|
Retryer(AttemptTimeLimiter<V> attemptTimeLimiter,
StopStrategy stopStrategy,
WaitStrategy waitStrategy,
com.google.common.base.Predicate<Attempt<V>> rejectionPredicate)
Constructor
|
Retryer(StopStrategy stopStrategy,
WaitStrategy waitStrategy,
com.google.common.base.Predicate<Attempt<V>> rejectionPredicate)
Constructor
|
Copyright © 2023. All rights reserved.