Interface IRetryListener
Interface for listener that can be used to add behaviour to a retry. Implementations of RetryOperations can chose to issue callbacks to an interceptor during the retry lifecycle.
public interface IRetryListener
Methods
Close(IRetryContext, Exception)
Called after the final attempt (successful or not).
void Close(IRetryContext context, Exception exception)
Parameters
context
IRetryContextthe current retry context
exception
Exceptionthe last exception that was thrown during retry
OnError(IRetryContext, Exception)
Called after every unsuccessful attempt at a retry.
void OnError(IRetryContext context, Exception exception)
Parameters
context
IRetryContextthe current retry context
exception
Exceptionthe last exception that was thrown during retry
Open(IRetryContext)
Called before the first attempt in a retry.
bool Open(IRetryContext context)
Parameters
context
IRetryContextthe current retry context
Returns
- bool
true if the retry should proceed