Table of Contents

Class RetryTemplate

Namespace
Steeltoe.Common.Retry
Assembly
Steeltoe.Common.dll
public abstract class RetryTemplate : IRetryOperation
Inheritance
RetryTemplate
Implements
Derived
Inherited Members

Fields

listeners

protected List<IRetryListener> listeners

Field Value

List<IRetryListener>

Methods

Execute(Action<IRetryContext>)

Execute the supplied RetryCallback with the configured retry semantics.

public abstract void Execute(Action<IRetryContext> retryCallback)

Parameters

retryCallback Action<IRetryContext>

the callback

Execute(Action<IRetryContext>, IRecoveryCallback)

Execute the supplied RetryCallback with the configured retry semantics. When retry is exhausted, call the recoverycallback

public abstract void Execute(Action<IRetryContext> retryCallback, IRecoveryCallback recoveryCallback)

Parameters

retryCallback Action<IRetryContext>

the callback

recoveryCallback IRecoveryCallback

the callback after retries are exhausted

Execute(Action<IRetryContext>, Action<IRetryContext>)

Execute the supplied RetryCallback with the configured retry semantics. When retry is exhausted, call the recoverycallback

public abstract void Execute(Action<IRetryContext> retryCallback, Action<IRetryContext> recoveryCallback)

Parameters

retryCallback Action<IRetryContext>

the callback

recoveryCallback Action<IRetryContext>

the callback after retries are exhausted

Execute<T>(Func<IRetryContext, T>)

Execute the supplied RetryCallback with the configured retry semantics.

public abstract T Execute<T>(Func<IRetryContext, T> retryCallback)

Parameters

retryCallback Func<IRetryContext, T>

the callback

Returns

T

result of operation

Type Parameters

T

the type of return value

Execute<T>(Func<IRetryContext, T>, IRecoveryCallback<T>)

Execute the supplied RetryCallback with the configured retry semantics. When retry is exhausted, call the recoverycallback

public abstract T Execute<T>(Func<IRetryContext, T> retryCallback, IRecoveryCallback<T> recoveryCallback)

Parameters

retryCallback Func<IRetryContext, T>

the callback

recoveryCallback IRecoveryCallback<T>

the callback after retries are exhausted

Returns

T

result of the operation

Type Parameters

T

the type of return value

Execute<T>(Func<IRetryContext, T>, Func<IRetryContext, T>)

Execute the supplied RetryCallback with the configured retry semantics. When retry is exhausted, call the recoverycallback

public abstract T Execute<T>(Func<IRetryContext, T> retryCallback, Func<IRetryContext, T> recoveryCallback)

Parameters

retryCallback Func<IRetryContext, T>

the callback

recoveryCallback Func<IRetryContext, T>

the callback after retries are exhausted

Returns

T

result of the operation

Type Parameters

T

the type of return value

RegisterListener(IRetryListener)

public void RegisterListener(IRetryListener listener)

Parameters

listener IRetryListener