public class ExponentialRetryPolicy extends RetryPolicy
DEFAULT_CLIENT_BACKOFF, DEFAULT_CLIENT_RETRY_COUNT, DEFAULT_MAX_BACKOFF, DEFAULT_MIN_BACKOFF| Constructor and Description |
|---|
ExponentialRetryPolicy(int[] retryableStatusCodes) |
ExponentialRetryPolicy(int deltaBackoff,
int maximumAttempts,
int[] retryableStatusCodes) |
| Modifier and Type | Method and Description |
|---|---|
int |
calculateBackoff(int currentRetryCount,
ServiceResponseContext response,
Exception error) |
boolean |
shouldRetry(int retryCount,
ServiceResponseContext response,
Exception error) |
public ExponentialRetryPolicy(int[] retryableStatusCodes)
public ExponentialRetryPolicy(int deltaBackoff,
int maximumAttempts,
int[] retryableStatusCodes)
public boolean shouldRetry(int retryCount,
ServiceResponseContext response,
Exception error)
shouldRetry in class RetryPolicypublic int calculateBackoff(int currentRetryCount,
ServiceResponseContext response,
Exception error)
calculateBackoff in class RetryPolicy/**
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/