public abstract class RetryPolicy extends Object implements RetryPolicyFactory
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CLIENT_BACKOFF
Represents the default client backoff interval, in milliseconds.
|
static int |
DEFAULT_CLIENT_RETRY_COUNT
Represents the default client retry count.
|
static int |
DEFAULT_MAX_BACKOFF
Represents the default maximum backoff interval, in milliseconds.
|
static int |
DEFAULT_MIN_BACKOFF
Represents the default minimum backoff interval, in milliseconds.
|
| Constructor and Description |
|---|
RetryPolicy()
Creates an instance of the
RetryPolicy class. |
RetryPolicy(int deltaBackoff,
int maxAttempts)
Creates an instance of the
RetryPolicy class using the specified delta backoff and maximum retry
attempts. |
| Modifier and Type | Method and Description |
|---|---|
abstract RetryInfo |
evaluate(RetryContext retryContext,
OperationContext operationContext)
Determines whether the operation should be retried and specifies the interval until the next retry.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateInstancepublic static final int DEFAULT_CLIENT_BACKOFF
public static final int DEFAULT_CLIENT_RETRY_COUNT
public static final int DEFAULT_MAX_BACKOFF
public static final int DEFAULT_MIN_BACKOFF
public RetryPolicy()
RetryPolicy class.public RetryPolicy(int deltaBackoff,
int maxAttempts)
RetryPolicy class using the specified delta backoff and maximum retry
attempts.deltaBackoff - The backoff interval, in milliseconds, between retries.maxAttempts - The maximum number of retry attempts.public abstract RetryInfo evaluate(RetryContext retryContext, OperationContext operationContext)
retryContext - A RetryContext object that indicates the number of retries, last request's results, whether
the next retry should happen in the primary or secondary location, and specifies the location mode.operationContext - An OperationContext object for tracking the current operation.RetryInfo object that indicates whether the next retry will happen in the primary or secondary
location, and specifies the location mode. If null, the operation will not be retried.Copyright © 2018. All Rights Reserved.