Class: Google::Apis::ManagedkafkaV1::TaskRetryPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/managedkafka_v1/classes.rb,
lib/google/apis/managedkafka_v1/representations.rb,
lib/google/apis/managedkafka_v1/representations.rb

Overview

Task Retry Policy is implemented on a best-effort basis. The default policy retries tasks with a minimum_backoff of 60 seconds, and a maximum_backoff of 12 hours. You can disable the policy by setting the task_retry_disabled field to true. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. Note that the delay between consecutive task restarts may not always precisely match the configured settings. This can happen when the ConnectCluster is in rebalancing state or if the ConnectCluster is unresponsive etc. The default values for minimum and maximum backoffs are 60 seconds and 12 hours respectively.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TaskRetryPolicy

Returns a new instance of TaskRetryPolicy.



1925
1926
1927
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 1925

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#maximum_backoffString

Optional. The maximum amount of time to wait before retrying a failed task. This sets an upper bound for the backoff delay. Corresponds to the JSON property maximumBackoff

Returns:

  • (String)


1911
1912
1913
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 1911

def maximum_backoff
  @maximum_backoff
end

#minimum_backoffString

Optional. The minimum amount of time to wait before retrying a failed task. This sets a lower bound for the backoff delay. Corresponds to the JSON property minimumBackoff

Returns:

  • (String)


1917
1918
1919
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 1917

def minimum_backoff
  @minimum_backoff
end

#task_retry_disabledBoolean Also known as: task_retry_disabled?

Optional. If true, task retry is disabled. Corresponds to the JSON property taskRetryDisabled

Returns:

  • (Boolean)


1922
1923
1924
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 1922

def task_retry_disabled
  @task_retry_disabled
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1930
1931
1932
1933
1934
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 1930

def update!(**args)
  @maximum_backoff = args[:maximum_backoff] if args.key?(:maximum_backoff)
  @minimum_backoff = args[:minimum_backoff] if args.key?(:minimum_backoff)
  @task_retry_disabled = args[:task_retry_disabled] if args.key?(:task_retry_disabled)
end