| Package | Description |
|---|---|
| com.linecorp.armeria.client |
Client core.
|
| com.linecorp.armeria.client.endpoint.dns |
DNS-based
EndpointGroup implementation. |
| com.linecorp.armeria.client.endpoint.healthcheck |
Filters out unhealthy
Endpoints from an existing
EndpointGroup by sending health check requests. |
| com.linecorp.armeria.client.retry |
A
Client decorator that handles failures and retries requests. |
| Modifier and Type | Method and Description |
|---|---|
DnsResolverGroupBuilder |
DnsResolverGroupBuilder.refreshBackoff(Backoff refreshBackoff)
Sets
Backoff which is used when the DnsNameResolver fails to update the cache. |
| Modifier and Type | Method and Description |
|---|---|
DnsTextEndpointGroupBuilder |
DnsTextEndpointGroupBuilder.backoff(Backoff backoff) |
DnsServiceEndpointGroupBuilder |
DnsServiceEndpointGroupBuilder.backoff(Backoff backoff) |
DnsAddressEndpointGroupBuilder |
DnsAddressEndpointGroupBuilder.backoff(Backoff backoff) |
| Modifier and Type | Method and Description |
|---|---|
HealthCheckedEndpointGroupBuilder |
HealthCheckedEndpointGroupBuilder.retryBackoff(Backoff retryBackoff) |
AbstractHealthCheckedEndpointGroupBuilder |
AbstractHealthCheckedEndpointGroupBuilder.retryBackoff(Backoff retryBackoff)
Sets the backoff between health check requests.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractBackoff
A skeletal
Backoff implementation. |
class |
BackoffWrapper
Wraps an existing
Backoff. |
| Modifier and Type | Field and Description |
|---|---|
static Backoff |
RetryStrategy.defaultBackoff
Deprecated.
Use
ofDefault(). |
| Modifier and Type | Method and Description |
|---|---|
static Backoff |
Backoff.exponential(long initialDelayMillis,
long maxDelayMillis)
Returns a
Backoff that waits an exponentially-increasing amount of time between attempts. |
static Backoff |
Backoff.exponential(long initialDelayMillis,
long maxDelayMillis,
double multiplier)
Returns a
Backoff that waits an exponentially-increasing amount of time between attempts. |
static Backoff |
Backoff.fibonacci(long initialDelayMillis,
long maxDelayMillis)
Returns a
Backoff for which the backoff delay increases in line with the Fibonacci sequence
f(n) = f(n-1) + f(n-2) where f(0) = f(1) = initialDelayMillis. |
static Backoff |
Backoff.fixed(long delayMillis)
Returns a
Backoff that waits a fixed delay between attempts. |
static Backoff |
Backoff.of(String specification)
Creates a new
Backoff that computes backoff delay using one of
exponential(long, long, double), fibonacci(long, long), fixed(long)
and random(long, long) chaining with withJitter(double, double) and
withMaxAttempts(int) from the specification string that conforms to
the following format:
exponential=[initialDelayMillis:maxDelayMillis:multiplier] is for
exponential(long, long, double) (multiplier will be 2.0 if it's omitted)
fibonacci=[initialDelayMillis:maxDelayMillis] is for
fibonacci(long, long)
fixed=[delayMillis] is for fixed(long)
random=[minDelayMillis:maxDelayMillis] is for random(long, long)
jitter=[minJitterRate:maxJitterRate] is for withJitter(double, double)
(if only one jitter value is specified, it will be used for withJitter(double)
maxAttempts=[maxAttempts] is for withMaxAttempts(int)
The order of options does not matter, and the specification needs at least one option. |
static Backoff |
Backoff.ofDefault()
Returns the default
Backoff. |
static Backoff |
Backoff.random(long minDelayMillis,
long maxDelayMillis)
Returns a
Backoff that computes backoff delay which is a random value between
minDelayMillis and maxDelayMillis chosen by ThreadLocalRandom. |
static Backoff |
Backoff.random(long minDelayMillis,
long maxDelayMillis,
Supplier<Random> randomSupplier)
Returns a
Backoff that computes backoff delay which is a random value between
minDelayMillis and maxDelayMillis. |
default Backoff |
Backoff.withJitter(double jitterRate)
Returns a
Backoff that adds a random jitter value to the original delay using
full jitter strategy. |
default Backoff |
Backoff.withJitter(double minJitterRate,
double maxJitterRate)
Returns a
Backoff that adds a random jitter value to the original delay using
full jitter strategy. |
default Backoff |
Backoff.withJitter(double minJitterRate,
double maxJitterRate,
Supplier<Random> randomSupplier)
Returns a
Backoff that adds a random jitter value to the original delay using
full jitter strategy. |
default Backoff |
Backoff.withMaxAttempts(int maxAttempts)
Returns a
Backoff which limits the number of attempts up to the specified value. |
static Backoff |
Backoff.withoutDelay()
Returns a
Backoff that will never wait between attempts. |
| Modifier and Type | Method and Description |
|---|---|
CompletionStage<Backoff> |
RetryStrategyWithContent.shouldRetry(ClientRequestContext ctx,
T response)
Tells whether the request sent with the specified
ClientRequestContext requires a retry or not. |
CompletionStage<Backoff> |
RetryStrategy.shouldRetry(ClientRequestContext ctx,
Throwable cause)
Tells whether the request sent with the specified
ClientRequestContext requires a retry or not. |
| Modifier and Type | Method and Description |
|---|---|
protected long |
AbstractRetryingClient.getNextDelay(ClientRequestContext ctx,
Backoff backoff)
Returns the next delay which retry will be made after.
|
protected long |
AbstractRetryingClient.getNextDelay(ClientRequestContext ctx,
Backoff backoff,
long millisAfterFromServer)
Returns the next delay which retry will be made after.
|
static RetryStrategy |
RetryStrategy.onServerErrorStatus(Backoff backoff)
Returns the
RetryStrategy that retries the request with the specified backoff
when the response status matches HttpStatusClass.SERVER_ERROR or an Exception is raised. |
static RetryStrategy |
RetryStrategy.onUnprocessed(Backoff backoff)
|
| Modifier and Type | Method and Description |
|---|---|
static RetryStrategy |
RetryStrategy.onStatus(BiFunction<HttpStatus,Throwable,Backoff> backoffFunction)
Returns the
RetryStrategy that decides to retry the request using the specified
backoffFunction. |
| Constructor and Description |
|---|
BackoffWrapper(Backoff delegate) |
Copyright © 2020 LeanCloud. All rights reserved.