C# Class Spring.Retry.Retry.Backoff.ExponentialBackOffPolicy

Implementation of IBackOffPolicy that increases the back off period for each retry attempt in a given set using the {@link Math#exp(double) exponential} function. This implementation is thread-safe and suitable for concurrent access. Modifications to the configuration do not affect any retry sets that are already in progress. The InitialInterval property controls the initial value passed to {@link Math#exp(double)} and the Multiplier property controls by how much this value is increased for each subsequent attempt.
Mostrar archivo Open project: spring-projects/spring-net-retry Class Usage Examples

Public Properties

Property Type Description
DEFAULT_INITIAL_INTERVAL long
DEFAULT_MAX_INTERVAL long
DEFAULT_MULTIPLIER double

Protected Properties

Property Type Description
Logger ILog

Public Methods

Method Description
BackOff ( IBackOffContext backOffContext ) : void

Pause for a length of time equal to 'exp(backOffContext.expSeed)'

Start ( IRetryContext context ) : IBackOffContext

Returns a new instance of IBackOffContext configured with the 'expSeed' and 'increment' values.

ToString ( ) : string

The to string.

WithSleeper ( ISleeper sleeper ) : ExponentialBackOffPolicy

The with sleeper.

Protected Methods

Method Description
CloneValues ( ExponentialBackOffPolicy target ) : void

The clone values.

NewInstance ( ) : ExponentialBackOffPolicy

The new instance.

Method Details

BackOff() public method

Pause for a length of time equal to 'exp(backOffContext.expSeed)'
public BackOff ( IBackOffContext backOffContext ) : void
backOffContext IBackOffContext The back off context.
return void

CloneValues() protected method

The clone values.
protected CloneValues ( ExponentialBackOffPolicy target ) : void
target ExponentialBackOffPolicy The target.
return void

NewInstance() protected method

The new instance.
protected NewInstance ( ) : ExponentialBackOffPolicy
return ExponentialBackOffPolicy

Start() public method

Returns a new instance of IBackOffContext configured with the 'expSeed' and 'increment' values.
public Start ( IRetryContext context ) : IBackOffContext
context IRetryContext The context.
return IBackOffContext

ToString() public method

The to string.
public ToString ( ) : string
return string

WithSleeper() public method

The with sleeper.
public WithSleeper ( ISleeper sleeper ) : ExponentialBackOffPolicy
sleeper ISleeper The sleeper.
return ExponentialBackOffPolicy

Property Details

DEFAULT_INITIAL_INTERVAL public_oe static_oe property

public static long DEFAULT_INITIAL_INTERVAL
return long

DEFAULT_MAX_INTERVAL public_oe static_oe property

public static long DEFAULT_MAX_INTERVAL
return long

DEFAULT_MULTIPLIER public_oe static_oe property

public static double DEFAULT_MULTIPLIER
return double

Logger protected_oe static_oe property

protected static ILog Logger
return ILog