C# Class Aspectacular.RetryExponentialDelayAspect

Aspect that will keep retrying method call for a certain amount of time, with ever increasing delays between retries.
Inheritance: RetryTimeAspect
Datei anzeigen Open project: vgribok/Aspectacular

Public Methods

Method Description
RetryExponentialDelayAspect ( uint keepTryingForMilliseconds, uint initialMillisecDelayBetweenRetries = 1, double delayMultiplier = 2.0, FailureDetectorDelegate optionalFailureDetector = null ) : System

Protected Methods

Method Description
SetRetryIfNecessary ( bool mayNeedToRetry ) : void

Method Details

RetryExponentialDelayAspect() public method

public RetryExponentialDelayAspect ( uint keepTryingForMilliseconds, uint initialMillisecDelayBetweenRetries = 1, double delayMultiplier = 2.0, FailureDetectorDelegate optionalFailureDetector = null ) : System
keepTryingForMilliseconds uint Maximum amount of time to keep retrying for, after which failure is considered permanent.
initialMillisecDelayBetweenRetries uint Delay after first failed attempt. Delay between subsequent attempts will grow.
delayMultiplier double Multiplier determining growth of delay between subsequent attempts.
optionalFailureDetector FailureDetectorDelegate Optional custom method to decide whether failure occurred and retry is required. If not provided, exception in the main method or result post-processing will trigger retry.
return System

SetRetryIfNecessary() protected method

protected SetRetryIfNecessary ( bool mayNeedToRetry ) : void
mayNeedToRetry bool
return void