Class GcpRetrySettings
java.lang.Object
com.salesforce.multicloudj.common.gcp.GcpRetrySettings
Translates a
RetryConfig into GCP client RetrySettings.-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.api.gax.retrying.RetrySettingsapply(com.google.api.gax.retrying.RetrySettings base, RetryConfig retryConfig)
-
Method Details
-
apply
public static com.google.api.gax.retrying.RetrySettings apply(com.google.api.gax.retrying.RetrySettings base, RetryConfig retryConfig) OverlaysretryConfig, already checked byRetryConfig.validate(), ontobase. Fields not set inretryConfigkeep the values frombase, which carries the client's defaults for the call being configured.attemptTimeoutsets a constant per-RPC timeout andtotalTimeoutbounds all attempts combined. FIXED mode is expressed as equal initial and max delays with a multiplier of 1.0. Retry delays are jittered, so the actual wait is a random duration up to the computed delay.An unset
totalTimeoutmeans no total time limit, so retries stop only at the max attempts. gax treats a zero total timeout as unset, but stops retrying altogether when both the total timeout and max attempts are zero. When neitherretryConfignorbasesets max attempts, the base total timeout is kept so retries stay enabled and bounded.- Parameters:
base- the client's default retry settings for the callretryConfig- the retry configuration to apply- Returns:
- the retry settings with
retryConfigapplied - Throws:
InvalidArgumentException- if retryConfig is null
-