Table of Contents

Interface IRetryListener

Namespace
Steeltoe.Common.Retry
Assembly
Steeltoe.Common.Abstractions.dll

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 IRetryContext

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.

void OnError(IRetryContext context, Exception exception)

Parameters

context IRetryContext

the current retry context

exception Exception

the last exception that was thrown during retry

Open(IRetryContext)

Called before the first attempt in a retry.

bool Open(IRetryContext context)

Parameters

context IRetryContext

the current retry context

Returns

bool

true if the retry should proceed