| 程序包 | 说明 |
|---|---|
| cn.aotcloud.retry |
| 限定符和类型 | 方法和说明 |
|---|---|
static StopStrategy |
StopStrategies.neverStop()
Returns a stop strategy which never stops retrying.
|
static StopStrategy |
StopStrategies.stopAfterAttempt(int attemptNumber)
Returns a stop strategy which stops after N failed attempts.
|
static StopStrategy |
StopStrategies.stopAfterDelay(long delayInMillis)
已过时。
Use
StopStrategies.stopAfterDelay(long, TimeUnit) instead. |
static StopStrategy |
StopStrategies.stopAfterDelay(long duration,
TimeUnit timeUnit)
Returns a stop strategy which stops after a given delay.
|
| 限定符和类型 | 方法和说明 |
|---|---|
RetryerBuilder<V> |
RetryerBuilder.withStopStrategy(StopStrategy stopStrategy)
Sets the stop strategy used to decide when to stop retrying.
|
| 构造器和说明 |
|---|
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.