Class: Gapic::GrpcServiceConfig::RetryPolicy
- Inherits:
-
Object
- Object
- Gapic::GrpcServiceConfig::RetryPolicy
- Defined in:
- lib/gapic/grpc_service_config/retry_policy.rb
Overview
RetryPolicy encapsulates the parameters governing the client-side retry for the GRPC method invocation. It is embedded into the MethodConfig
Instance Attribute Summary collapse
-
#initial_delay_seconds ⇒ Object
readonly
Returns the value of attribute initial_delay_seconds.
-
#max_delay_seconds ⇒ Object
readonly
Returns the value of attribute max_delay_seconds.
-
#multiplier ⇒ Object
readonly
Returns the value of attribute multiplier.
-
#status_codes ⇒ Object
readonly
Returns the value of attribute status_codes.
Instance Method Summary collapse
-
#empty? ⇒ Boolean
Returns whether RetryPolicy is empty (does not contain any values).
-
#initialize(initial_delay_seconds, max_delay_seconds, multiplier, status_codes) ⇒ RetryPolicy
constructor
Create new ParsedRetryPolicy.
Constructor Details
#initialize(initial_delay_seconds, max_delay_seconds, multiplier, status_codes) ⇒ RetryPolicy
Create new ParsedRetryPolicy.
37 38 39 40 41 42 |
# 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 |
Instance Attribute Details
#initial_delay_seconds ⇒ Object (readonly)
Returns the value of attribute initial_delay_seconds.
24 25 26 |
# File 'lib/gapic/grpc_service_config/retry_policy.rb', line 24 def initial_delay_seconds @initial_delay_seconds end |
#max_delay_seconds ⇒ Object (readonly)
Returns the value of attribute max_delay_seconds.
25 26 27 |
# File 'lib/gapic/grpc_service_config/retry_policy.rb', line 25 def max_delay_seconds @max_delay_seconds end |
#multiplier ⇒ Object (readonly)
Returns the value of attribute multiplier.
26 27 28 |
# File 'lib/gapic/grpc_service_config/retry_policy.rb', line 26 def multiplier @multiplier end |
#status_codes ⇒ Object (readonly)
Returns the value of attribute status_codes.
27 28 29 |
# File 'lib/gapic/grpc_service_config/retry_policy.rb', line 27 def status_codes @status_codes end |
Instance Method Details
#empty? ⇒ Boolean
Returns whether RetryPolicy is empty (does not contain any values)
49 50 51 |
# 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 |