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

IWaitAndRetryPolicy

public interface IWaitAndRetryPolicy
Represents an abstract object to support resiliency and retry policies.
using System; using System.Diagnostics.CodeAnalysis; using System.Threading; namespace Relativity.DataExchange { public interface IWaitAndRetryPolicy { void WaitAndRetry<TException>(Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Action<CancellationToken> execFunc, CancellationToken token) where TException : Exception; void WaitAndRetry<TException>(int maxRetryCount, Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Action<CancellationToken> execFunc, CancellationToken token) where TException : Exception; [SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "This is required to support return value.")] TResult WaitAndRetry<TResult, TException>(Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Func<CancellationToken, TResult> execFunc, CancellationToken token) where TException : Exception; [SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "This is required to support return value.")] TResult WaitAndRetry<TResult>(Func<Exception, bool> exceptionPredicate, Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Func<CancellationToken, TResult> execFunc, CancellationToken token); [SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "This is required to support return value.")] TResult WaitAndRetry<TResult, TException>(int maxRetryCount, Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Func<CancellationToken, TResult> execFunc, CancellationToken token) where TException : Exception; } }