public interface StorageRetryStrategy extends Serializable
Modifier and Type | Method and Description |
---|---|
static StorageRetryStrategy |
getDefaultStorageRetryStrategy()
Factory method to get an instance of the default implementation of
StorageRetryStrategy . |
com.google.api.gax.retrying.ResultRetryAlgorithm<?> |
getIdempotentHandler()
Factory method to provide a
ResultRetryAlgorithm which will be used to evaluate whether
a retry can happen for an operation which has been deemed idempotent. |
static StorageRetryStrategy |
getLegacyStorageRetryStrategy()
Deprecated.
please migrate to using
getDefaultStorageRetryStrategy() which is capable
of providing handlers which are appropriate for idempotent and non-idempotent calls. |
com.google.api.gax.retrying.ResultRetryAlgorithm<?> |
getNonidempotentHandler() |
static StorageRetryStrategy |
getUniformStorageRetryStrategy()
Factory method to get an instance of
StorageRetryStrategy which will uniformly retry
all calls as if they were idempotent. |
com.google.api.gax.retrying.ResultRetryAlgorithm<?> getIdempotentHandler()
ResultRetryAlgorithm
which will be used to evaluate whether
a retry can happen for an operation which has been deemed idempotent.com.google.api.gax.retrying.ResultRetryAlgorithm<?> getNonidempotentHandler()
static StorageRetryStrategy getDefaultStorageRetryStrategy()
StorageRetryStrategy
. The returned instance is provides handler which are appropriate for
calls which are known to be idempotent vs non-idempotent.
All non-idempotent calls will not be retried
The set of retryable cases handled by this strategy is more comprehensive than that of the legacy strategy and should always be preferred.
The following HTTP Status Codes will be retried for all idempotent calls:
Code | Name |
---|---|
408 | Request Timeout |
429 | Too Many Requests |
500 | Internal Server Error |
502 | Bad Gateway |
503 | Service Unavailable |
504 | Gateway Timeout |
static StorageRetryStrategy getUniformStorageRetryStrategy()
StorageRetryStrategy
which will uniformly retry
all calls as if they were idempotent.
NOTE:This strategy is unsafe and will result in retying some non-idempotent calls. Care should be taken to ensure calls which would not normally be considered idempotent are made idempotent by some other means in your program.
@Deprecated static StorageRetryStrategy getLegacyStorageRetryStrategy()
getDefaultStorageRetryStrategy()
which is capable
of providing handlers which are appropriate for idempotent and non-idempotent calls.StorageRetryStrategy
with the behavior which was
used prior to version 2.1.8. This strategy is unsafe and will result in retying some
non-idempotent calls.Copyright © 2022 Google LLC. All rights reserved.