public final class RetryParams extends Object implements Serializable
ExceptionHandler criteria the calling
thread sleeps for initialRetryDelayMillis. Each subsequent failure the sleep interval is
calculated as:
retryDelayBackoffFactor ^ attempts * initialRetryDelayMillis but would be upper-bounded
to maxRetryDelayMillis
retryMaxAttempts are made, or both
retryMinAttempts are made and totalRetryPeriodMillis have elapsed. To construct
RetryParams, first create a RetryParams.Builder. The builder is mutable and each
of the parameters can be set (any unset parameters will fallback to the defaults). The
Builder can be then used to create an immutable RetryParams object. For default
RetryParams use defaultInstance(). Default settings are subject to change release
to release. If you require specific settings, explicitly create an instance of
RetryParams with all the required settings.RetryHelper,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
RetryParams.Builder
RetryParams builder.
|
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_INITIAL_RETRY_DELAY_MILLIS |
static long |
DEFAULT_MAX_RETRY_DELAY_MILLIS |
static double |
DEFAULT_RETRY_DELAY_BACKOFF_FACTOR |
static int |
DEFAULT_RETRY_MAX_ATTEMPTS |
static int |
DEFAULT_RETRY_MIN_ATTEMPTS |
static long |
DEFAULT_TOTAL_RETRY_PERIOD_MILLIS
Note that App Engine Standard Environment front-end modules have a 60 second deadline for HTTP
requests.
|
| Modifier and Type | Method and Description |
|---|---|
static RetryParams.Builder |
builder() |
static RetryParams |
defaultInstance()
Returns an instance with the default parameters.
|
boolean |
equals(Object obj) |
int |
hashCode() |
long |
initialRetryDelayMillis()
Returns the initialRetryDelayMillis.
|
long |
maxRetryDelayMillis()
Returns the maxRetryDelayMillis.
|
static RetryParams |
noRetries()
Returns an instance of
RetryParams where `retryMaxAttempts` and `retryMinAttempts` are
set to `1`. |
double |
retryDelayBackoffFactor()
Returns the maxRetryDelayBackoffFactor.
|
int |
retryMaxAttempts()
Returns the retryMaxAttempts.
|
int |
retryMinAttempts()
Returns the retryMinAttempts.
|
RetryParams.Builder |
toBuilder() |
String |
toString() |
long |
totalRetryPeriodMillis()
Returns the totalRetryPeriodMillis.
|
public static final long DEFAULT_TOTAL_RETRY_PERIOD_MILLIS
public static final int DEFAULT_RETRY_MIN_ATTEMPTS
public static final int DEFAULT_RETRY_MAX_ATTEMPTS
public static final long DEFAULT_INITIAL_RETRY_DELAY_MILLIS
public static final long DEFAULT_MAX_RETRY_DELAY_MILLIS
public static final double DEFAULT_RETRY_DELAY_BACKOFF_FACTOR
public static RetryParams defaultInstance()
public static RetryParams noRetries()
RetryParams where `retryMaxAttempts` and `retryMinAttempts` are
set to `1`.public int retryMinAttempts()
public int retryMaxAttempts()
public long initialRetryDelayMillis()
public long maxRetryDelayMillis()
public double retryDelayBackoffFactor()
public long totalRetryPeriodMillis()
public static RetryParams.Builder builder()
public RetryParams.Builder toBuilder()
Copyright © 2016 Google. All rights reserved.