Relativity.DataExchange.IWaitAndRetryPolicy
Represents an abstract object to support resiliency and retry policies.
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;
TResult WaitAndRetry<TResult, TException>(Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Func<CancellationToken, TResult> execFunc, CancellationToken token) where TException : Exception;
TResult WaitAndRetry<TResult>(Func<Exception, bool> exceptionPredicate, Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Func<CancellationToken, TResult> execFunc, CancellationToken token);
TResult WaitAndRetry<TResult, TException>(int maxRetryCount, Func<int, TimeSpan> retryDuration, Action<Exception, TimeSpan> retryAction, Func<CancellationToken, TResult> execFunc, CancellationToken token) where TException : Exception;
}
}