Table of Contents

Class LinearRetry

Namespace
StackExchange.Redis
Assembly
StackExchange.Redis.StrongName.dll

Represents a retry policy that performs retries at a fixed interval. The retries are performed upto a maximum allowed time.

public class LinearRetry : IReconnectRetryPolicy
Inheritance
LinearRetry
Implements
Inherited Members

Constructors

LinearRetry(int)

Initializes a new instance using the specified maximum retry elapsed time allowed.

public LinearRetry(int maxRetryElapsedTimeAllowedMilliseconds)

Parameters

maxRetryElapsedTimeAllowedMilliseconds int

maximum elapsed time in milliseconds to be allowed for it to perform retries

Methods

ShouldRetry(long, int)

This method is called by the ConnectionMultiplexer to determine if a reconnect operation can be retried now.

public bool ShouldRetry(long currentRetryCount, int timeElapsedMillisecondsSinceLastRetry)

Parameters

currentRetryCount long

The number of times reconnect retries have already been made by the ConnectionMultiplexer while it was in the connecting state

timeElapsedMillisecondsSinceLastRetry int

Total elapsed time in milliseconds since the last reconnect retry was made

Returns

bool