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.
Namespace: Steeltoe.Common.Retry
Assembly: Steeltoe.Common.Abstractions.dll
Syntax
public interface IRetryListener
Methods
| Edit this page View SourceClose(IRetryContext, Exception)
Called after the final attempt (successful or not).
Declaration
void Close(IRetryContext context, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
IRetryContext | context | the current retry context |
Exception | exception | the last exception that was thrown during retry |
OnError(IRetryContext, Exception)
Called after every unsuccessful attempt at a retry.
Declaration
void OnError(IRetryContext context, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
IRetryContext | context | the current retry context |
Exception | exception | the last exception that was thrown during retry |
Open(IRetryContext)
Called before the first attempt in a retry.
Declaration
bool Open(IRetryContext context)
Parameters
Type | Name | Description |
---|---|---|
IRetryContext | context | the current retry context |
Returns
Type | Description |
---|---|
System.Boolean | true if the retry should proceed |