class Gapic::GrpcServiceConfig::RetryPolicy
RetryPolicy
encapsulates the parameters governing the client-side retry for the GRPC method invocation. It is embedded into the MethodConfig
Attributes
initial_delay_seconds[R]
max_delay_seconds[R]
multiplier[R]
status_codes[R]
Public Class Methods
new(initial_delay_seconds, max_delay_seconds, multiplier, status_codes)
click to toggle source
Create new ParsedRetryPolicy.
@param initial_delay_seconds
[Float, nil] the value of initial retry delay in seconds if provided @param max_delay_seconds
[Float, nil] the value of max retry delay in seconds if provided @param multiplier [Float, nil] the value of retry multiplier if provided @param status_codes
[Array<String>, nil] the retry status codes if provided
# File lib/gapic/grpc_service_config/retry_policy.rb, line 37 def initialize initial_delay_seconds, max_delay_seconds, multiplier, status_codes @initial_delay_seconds = initial_delay_seconds @max_delay_seconds = max_delay_seconds @multiplier = multiplier @status_codes = status_codes end
Public Instance Methods
empty?()
click to toggle source
Returns whether RetryPolicy
is empty (does not contain any values)
@return [Boolean] whether RetryPolicy
is empty
# File lib/gapic/grpc_service_config/retry_policy.rb, line 49 def empty? @initial_delay_seconds.nil? && @max_delay_seconds.nil? && @multiplier.nil? && status_codes.to_a.empty? end