Package com.google.cloud.storage
Interface StorageRetryStrategy
- All Superinterfaces:
Serializable
-
Method Summary
Modifier and TypeMethodDescriptionstatic StorageRetryStrategyFactory method to get an instance of the default implementation ofStorageRetryStrategy.com.google.api.gax.retrying.ResultRetryAlgorithm<?>Factory method to provide aResultRetryAlgorithmwhich will be used to evaluate whether a retry can happen for an operation which has been deemed idempotent.static StorageRetryStrategyDeprecated.com.google.api.gax.retrying.ResultRetryAlgorithm<?>static StorageRetryStrategyFactory method to get an instance ofStorageRetryStrategywhich will uniformly retry all calls as if they were idempotent.
-
Method Details
-
getIdempotentHandler
com.google.api.gax.retrying.ResultRetryAlgorithm<?> getIdempotentHandler()Factory method to provide aResultRetryAlgorithmwhich will be used to evaluate whether a retry can happen for an operation which has been deemed idempotent.- Returns:
-
getNonidempotentHandler
com.google.api.gax.retrying.ResultRetryAlgorithm<?> getNonidempotentHandler() -
getDefaultStorageRetryStrategy
Factory method to get an instance of the default implementation ofStorageRetryStrategy. 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.
Retried HTTP status codes for idempotent calls Code Name 408 Request Timeout 429 Too Many Requests 500 Internal Server Error 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout -
getUniformStorageRetryStrategy
Factory method to get an instance ofStorageRetryStrategywhich 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.
-
getLegacyStorageRetryStrategy
Deprecated.please migrate to usinggetDefaultStorageRetryStrategy()which is capable of providing handlers which are appropriate for idempotent and non-idempotent calls.Factory method to get an instance ofStorageRetryStrategywith the behavior which was used prior to version 2.1.8. This strategy is unsafe and will result in retying some non-idempotent calls.
-
getDefaultStorageRetryStrategy()which is capable of providing handlers which are appropriate for idempotent and non-idempotent calls.