<PackageReference Include="Relativity.Server.Import.SDK" Version="24000.1.1" />

IWaitAndRetryPolicy

public interface IWaitAndRetryPolicy
Represents an abstract object to support resiliency and retry policies.
void WaitAndRetry<TException>(Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Action<CancellationToken> execFunc, CancellationToken token) where TException : Exception

Performs the synchronous retry operation using the specified retry duration function.

void WaitAndRetry<TException>(int maxRetryCount, Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Action<CancellationToken> execFunc, CancellationToken token) where TException : Exception

Performs the synchronous retry operation for the specified exception type and retry duration function.

TResult WaitAndRetry<TResult, TException>(Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Func<CancellationToken, TResult> execFunc, CancellationToken token) where TException : Exception

Performs the synchronous retry operation for the specified exception type and retry duration function and return a value.

TResult WaitAndRetry<TResult>(Func<Exception, bool> exceptionPredicate, Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Func<CancellationToken, TResult> execFunc, CancellationToken token)

Performs the synchronous retry operation for the specified exception and retry duration function and return a value.

TResult WaitAndRetry<TResult, TException>(int maxRetryCount, Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Func<CancellationToken, TResult> execFunc, CancellationToken token) where TException : Exception

Performs the synchronous retry operation for the specified exception type and retry duration function and return a value.