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.



1894
1895
1896
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 1894

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)


1880
1881
1882
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 1880

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)


1886
1887
1888
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 1886

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)


1891
1892
1893
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 1891

def task_retry_disabled
  @task_retry_disabled
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1899
1900
1901
1902
1903
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 1899

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