| 程序包 | 说明 |
|---|---|
| com.dyngr | |
| com.dyngr.core |
| 限定符和类型 | 方法和说明 |
|---|---|
PollerBuilder<V> |
PollerBuilder.withWaitStrategy(WaitStrategy... waitStrategies)
Sets a list of wait strategy used to decide how long to sleep between failed attempts.
|
PollerBuilder<V> |
PollerBuilder.withWaitStrategy(WaitStrategy waitStrategy)
Sets the wait strategy used to decide how long to sleep between failed attempts.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static <T extends Throwable> |
WaitStrategies.exceptionWait(Class<T> exceptionClass,
ExceptionWaitHandler<T> calculator)
Returns a strategy which sleeps for an amount of time based on the Exception that occurred.
|
static WaitStrategy |
WaitStrategies.exponentialWait()
Returns a strategy which sleeps for an exponential amount of time after the first failed attempt,
and in exponentially incrementing amounts after each failed attempt up to Long.MAX_VALUE.
|
static WaitStrategy |
WaitStrategies.exponentialWait(long multiplier,
long maximumTime,
TimeUnit maximumTimeUnit)
Returns a strategy which sleeps for an exponential amount of time after the first failed attempt,
and in exponentially incrementing amounts after each failed attempt up to the maximumTime.
|
static WaitStrategy |
WaitStrategies.exponentialWait(long maximumTime,
TimeUnit maximumTimeUnit)
Returns a strategy which sleeps for an exponential amount of time after the first failed attempt,
and in exponentially incrementing amounts after each failed attempt up to the maximumTime.
|
static WaitStrategy |
WaitStrategies.fibonacciWait()
Returns a strategy which sleeps for an increasing amount of time after the first failed attempt,
and in Fibonacci increments after each failed attempt up to
Long.MAX_VALUE. |
static WaitStrategy |
WaitStrategies.fibonacciWait(long multiplier,
long maximumTime,
TimeUnit maximumTimeUnit)
Returns a strategy which sleeps for an increasing amount of time after the first failed attempt,
and in Fibonacci increments after each failed attempt up to the
maximumTime. |
static WaitStrategy |
WaitStrategies.fibonacciWait(long maximumTime,
TimeUnit maximumTimeUnit)
Returns a strategy which sleeps for an increasing amount of time after the first failed attempt,
and in Fibonacci increments after each failed attempt up to the
maximumTime. |
static WaitStrategy |
WaitStrategies.fixedWait(long sleepTime,
TimeUnit timeUnit)
Returns a wait strategy that sleeps a fixed amount of time before retrying.
|
static WaitStrategy |
WaitStrategies.incrementingWait(long initialSleepTime,
TimeUnit initialSleepTimeUnit,
long increment,
TimeUnit incrementTimeUnit)
Returns a strategy that sleeps a fixed amount of time after the first
failed attempt and in incrementing amounts of time after each additional
failed attempt.
|
static WaitStrategy |
WaitStrategies.join(WaitStrategy... waitStrategies)
Joins one or more wait strategies to derive a composite wait strategy.
|
static WaitStrategy |
WaitStrategies.noWait()
Returns a wait strategy that doesn't sleep at all before retrying.
|
static WaitStrategy |
WaitStrategies.randomWait(long maximumTime,
TimeUnit timeUnit)
Returns a strategy that sleeps a random amount of time before retrying.
|
static WaitStrategy |
WaitStrategies.randomWait(long minimumTime,
TimeUnit minimumTimeUnit,
long maximumTime,
TimeUnit maximumTimeUnit)
Returns a strategy that sleeps a random amount of time before retrying.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static WaitStrategy |
WaitStrategies.join(WaitStrategy... waitStrategies)
Joins one or more wait strategies to derive a composite wait strategy.
|
| 构造器和说明 |
|---|
DefaultPoller(AttemptMaker<V> maker,
StopStrategy stopStrategy,
WaitStrategy waitStrategy,
ExecutorService executor) |
Copyright © 2019. All rights reserved.