Interface IRetryPolicyBuilder
interface IRetryPolicyBuilder
Extends com.amazon.apmf.IStandard
The IRetryPolicyBuilder allows callers to express retry preferences for Task failures.
The retry policy consists of a minimum delay between successive retries and a count of retries to
perform. A Task is marked TaskState::FAILED if retries are exhausted. It remains in
TaskState::PENDING as it waits for the next execution opportunity.
Methods
minimumDelayBetweenRetries()
Set the delay period required before retrying the given Task. Note that this delay will be applied to every subsequent retry.IRetryPolicyBuilder*minimumDelayBetweenRetries(com.amazon.apmf.MonotonicDurationdelay)
Parameters
delay
com.amazon.apmf.MonotonicDuration — Required
The minimum delay between retries.
Returns
IRetryPolicyBuilder*
IRetryPolicyBuilder instance on success, error otherwise.
maximumRetryCount()
Set the maximum number of retries for the given Task. Note that when retry count exceeds the given number, Task Manager may remove the Task.IRetryPolicyBuilder*maximumRetryCount(i32count)
Parameters
count
i32 — Required
The maximum number of retries.
Returns
IRetryPolicyBuilder*
IRetryPolicyBuilder instance on success, error otherwise.
build()
Builds aIRetryPolicy*build()
IRetryPolicy instance with the set parameters.
Note that calling this method after setting all parameters.
Returns
IRetryPolicy*
A retry policy instance to be used in TaskBuilder.
Throws
com.amazon.apmf.InvalidArgumentError— If any set member variable is invalid.

