Class GcpRetrySettings

java.lang.Object
com.salesforce.multicloudj.common.gcp.GcpRetrySettings

public final class GcpRetrySettings extends Object
Translates a RetryConfig into GCP client RetrySettings.
  • Method Details

    • apply

      public static com.google.api.gax.retrying.RetrySettings apply(com.google.api.gax.retrying.RetrySettings base, RetryConfig retryConfig)
      Overlays retryConfig, already checked by RetryConfig.validate(), onto base. Fields not set in retryConfig keep the values from base, which carries the client's defaults for the call being configured.

      attemptTimeout sets a constant per-RPC timeout and totalTimeout bounds 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 totalTimeout means 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 neither retryConfig nor base sets max attempts, the base total timeout is kept so retries stay enabled and bounded.

      Parameters:
      base - the client's default retry settings for the call
      retryConfig - the retry configuration to apply
      Returns:
      the retry settings with retryConfig applied
      Throws:
      InvalidArgumentException - if retryConfig is null