你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

FixedInterval Class

  • java.lang.Object
    • RetryStrategy
      • com.microsoft.azure.elasticdb.core.commons.transientfaulthandling.FixedInterval

public class FixedInterval extends RetryStrategy

Represents a retry strategy with a specified number of retry attempts and a default, fixed time interval between retries.

Constructor Summary

Constructor Description
FixedInterval()

Initializes a new instance of the FixedInterval class.

FixedInterval(int retryCount)

Initializes a new instance of the FixedInterval class with the specified number of retry attempts.

FixedInterval(int retryCount, Duration retryInterval)

Initializes a new instance of the FixedInterval class with the specified number of retry attempts and time interval.

FixedInterval(String name, int retryCount, Duration retryInterval)

Initializes a new instance of the FixedInterval class with the specified number of retry attempts, time interval, and retry strategy.

FixedInterval(String name, int retryCount, Duration retryInterval, boolean firstFastRetry)

Initializes a new instance of the FixedInterval class with the specified number of retry attempts, time interval, retry strategy, and fast start option.

Method Summary

Modifier and Type Method and Description
ShouldRetry getShouldRetry()

Returns the corresponding ShouldRetry delegate.

Inherited Members

Constructor Details

FixedInterval

public FixedInterval()

Initializes a new instance of the FixedInterval class.

FixedInterval

public FixedInterval(int retryCount)

Initializes a new instance of the FixedInterval class with the specified number of retry attempts.

Parameters:

retryCount - The number of retry attempts.

FixedInterval

public FixedInterval(int retryCount, Duration retryInterval)

Initializes a new instance of the FixedInterval class with the specified number of retry attempts and time interval.

Parameters:

retryCount - The number of retry attempts.
retryInterval - The time interval between retries.

FixedInterval

public FixedInterval(String name, int retryCount, Duration retryInterval)

Initializes a new instance of the FixedInterval class with the specified number of retry attempts, time interval, and retry strategy.

Parameters:

name - The retry strategy name.
retryCount - The number of retry attempts.
retryInterval - The time interval between retries.

FixedInterval

public FixedInterval(String name, int retryCount, Duration retryInterval, boolean firstFastRetry)

Initializes a new instance of the FixedInterval class with the specified number of retry attempts, time interval, retry strategy, and fast start option.

Parameters:

name - The retry strategy name.
retryCount - The number of retry attempts.
retryInterval - The time interval between retries.
firstFastRetry - true to immediately retry in the first attempt; otherwise, false. The subsequent retries will remain subject to the configured retry interval.

Method Details

getShouldRetry

public ShouldRetry getShouldRetry()

Returns the corresponding ShouldRetry delegate.

Returns:

The ShouldRetry delegate.

Applies to