API Reference
Class
RetryExecutor
Utility class that provides retry capability for rule executions.
Inheritance
- Object
- RetryExecutor
Methods
CalculateRetryDelay(System.Int32 retryAttempt) #Calculates the delay for a retry attempt using exponential backoff.
Parameters
- retryAttempt System.Int32
- The retry attempt number (0-based: 0 = first retry, 1 = second retry, etc.)
Returns
Delay in milliseconds
public static async Task ExecuteWithRetryAsync(String ruleName, Func<Task> ruleAction, Func<Exception, Boolean> shouldRetry = null) #Returns:
TaskExecutes a rule action with retry logic.
Parameters
- ruleName System.String
- Name of the rule being executed
- ruleAction System.Func{System.Threading.Tasks.Task}
- The action to execute
- shouldRetry System.Func{System.Exception,System.Boolean} = null
- Optional predicate to determine if a failure should be retried
Returns
Task representing the execution
public static Boolean IsTransientError(Exception exception) #Returns:
BooleanDetermines if an exception indicates a transient error that should be retried.
Parameters
- exception System.Exception
- The exception to check
Returns
True if the exception indicates a transient error
public static Void ResetRuleState(RuleComplete rule) #Returns:
VoidResets the rule state to prepare for a retry attempt.
Parameters
- rule TestimoX.Definitions.RuleComplete