Class: Gapic::CallOptions::RetryPolicy

Inherits:
Gapic::Common::RetryPolicy show all
Defined in:
lib/gapic/call_options/retry_policy.rb

Overview

The policy for retrying failed RPC calls using an incremental backoff. A new object instance should be used for every RpcCall invocation.

Only errors originating from GRPC will be retried.

Constant Summary

Constants inherited from Gapic::Common::RetryPolicy

Gapic::Common::RetryPolicy::DEFAULT_INITIAL_DELAY, Gapic::Common::RetryPolicy::DEFAULT_MAX_DELAY, Gapic::Common::RetryPolicy::DEFAULT_MULTIPLIER, Gapic::Common::RetryPolicy::DEFAULT_RETRY_CODES, Gapic::Common::RetryPolicy::DEFAULT_TIMEOUT

Instance Method Summary collapse

Methods inherited from Gapic::Common::RetryPolicy

#call, #delay, #dup, #initial_delay, #max_delay, #multiplier, #perform_delay!, #perform_delay_count, #retry_codes, #start!, #timeout

Constructor Details

#initialize(retry_codes: nil, initial_delay: nil, multiplier: nil, max_delay: nil) ⇒ RetryPolicy

Create new API Call RetryPolicy.

Parameters:

  • retry_codes (Array<String|Numeric>) (defaults to: nil)

    List of retry codes.

  • initial_delay (Numeric) (defaults to: nil)

    Initial delay in seconds.

  • multiplier (Numeric) (defaults to: nil)

    The delay scaling factor for each subsequent retry attempt.

  • max_delay (Numeric) (defaults to: nil)

    Maximum delay in seconds.



34
35
36
# File 'lib/gapic/call_options/retry_policy.rb', line 34

def initialize retry_codes: nil, initial_delay: nil, multiplier: nil, max_delay: nil
  super
end