Share via


Source Schema for the Transient Fault Handling Application Block

Retired Content

This content and the technology described is outdated and is no longer being maintained. For more information, see Transient Fault Handling.

patterns & practices Developer Center

On this page:
The RetryPolicyConfiguration Element | Attributes of the RetryPolicyConfiguration Element | The incremental Element | The fixedInterval Element | The exponentialBackoff Element | The add Element

This topic lists the XML elements and attributes used to configure the Transient Fault Handling Application Block. You can manually edit the XML data, but the Enterprise Library configuration tool greatly simplifies this task. If you choose to edit the XML manually, use the schema information contained in this topic.

The configuration file has the section handler declarations shown in the following XML.

Note

You must add this section to the application configuration file so that the Enterprise Library common infrastructure recognizes the Transient Fault Handling Application Block configuration settings.

<configSections>
    <section name="RetryPolicyConfiguration" type="Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration.RetryPolicyConfigurationSettings, Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling, Version=5.0.1031.0, Culture=neutral, PublicKeyToken=null" requirePermission="true" />
    <section name="typeRegistrationProvidersConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.TypeRegistrationProvidersConfigurationSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</configSections>

<typeRegistrationProvidersConfiguration>
    <clear />
    ...
    <add sectionName="RetryPolicyConfiguration" name="RetryPolicyConfiguration" />
</typeRegistrationProvidersConfiguration>

The section handler declaration contains the name of the configuration settings section and the name of the section handler class that processes configuration data in that section. The name of the configuration settings section is RetryPolicyConfiguration. The name of the section handler class is Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration.RetryPolicyConfigurationSettings.

The RetryPolicyConfiguration Element

The RetryPolicyConfiguration element specifies the configuration of the Transient Fault Handling Application Block. This element is required.

The following sections describe attributes and child elements of the RetryPolicyConfiguration element.

Note

To specify a timespan value in milliseconds, use the following notation:
00:00:00.200 is 200 milliseconds.

Attributes of the RetryPolicyConfiguration Element

The following table lists the attributes for the RetryPolicyConfiguration element.

Attribute

Description

defaultRetryStrategy

This attribute identifies the global default retry policy the block uses if no other policy is specified.

This is the name of a retry policy defined in the retry policy configuration. This string must match the value of the name attribute of one of the incremental, fixedInterval, or exponentialBackoff elements.

This attribute is required.

defaultSqlConnectionRetryStrategy

This attribute identifies the default retry policy the block uses if no other policy is specified when the client creates a policy for SQL Azure connections.

This is the name of a retry policy defined in the retry policy configuration. This string must match the value of the name attribute of one of the incremental, fixedInterval, or exponentialBackoff elements.

This attribute is optional.

defaultSqlCommandRetryStrategy

This attribute identifies the default retry policy the block uses if no other policy is specified when the client creates a policy for SQL Azure commands.

This attribute identifies the default retry policy the block uses if no other policy is specified.

This is the name of a retry policy defined in the retry policy configuration. This string must match the value of the name attribute of one of the incremental, fixedInterval, or exponentialBackoff elements.

This attribute is optional.

defaultAzureServiceBusRetryStrategy

This attribute identifies the default retry policy the block uses if no other policy is specified when the client creates a policy for Microsoft Azure Service Bus operations.

This is the name of a retry policy defined in the retry policy configuration. This string must match the value of the name attribute of one of the incremental, fixedInterval, or exponentialBackoff elements.

This attribute is optional.

defaultAzureCachingRetryStrategy

This attribute identifies the default retry policy the block uses if no other policy is specified when the client creates a policy for Azure Caching operations.

This is the name of a retry policy defined in the retry policy configuration. This string must match the value of the name attribute of one of the incremental, fixedInterval, or exponentialBackoff elements.

This attribute is optional.

defaultAzureStorageRetryStrategy

This attribute identifies the default retry policy the block uses if no other policy is specified when the client creates a policy for Azure storage operations.

This is the name of a retry policy defined in the retry policy configuration. This string must match the value of the name attribute of one of the incremental, fixedInterval, or exponentialBackoff elements.

This attribute is optional.

The RetryPolicyConfiguration element contains one or more retry strategies. Retry strategies are defined using incremental elements, fixedInterval elements, and exponentialBackoff elements.

The incremental Element

This element defines an incremental retry strategy. The incremental element is a child of the RetryPolicyConfiguration element. This element can occur zero or more times.

The following table lists the attributes of the incremental element.

Attribute

Description

name

A string value that identifies the name of the retry strategy.

This attribute is required.

firstFastRetry

A Boolean value that determines whether the block should perform the first retry immediately.

This attribute is optional. The default value is true.

retryIncrement

A timespan value that specifies by how much the interval should increase between retries.

This attribute is optional. The default value is "00:00:01."

retryInterval

A timespan value that specifies the initial interval between retries.

This attribute is optional. The default value is "00:00:01."

maxRetryCount

An integer value that specifies the maximum number of retries to attempt.

This attribute is optional. The default value is 10.

The fixedInterval Element

This element defines a fixed interval retry strategy. The fixedInterval element is a child of the RetryPolicyConfiguration element. This element can occur zero or more times.

The following table lists the attributes of the fixedInterval element.

Attribute

Description

name

A string value that identifies the name of the retry strategy.

This attribute is required.

firstFastRetry

A Boolean value that determines whether the block should perform the first retry immediately.

This attribute is optional. The default value is true.

initialInterval

A timespan value that specifies the interval between retries.

This attribute is optional. The default value is "00:00:01."

maxRetryCount

An integer value that specifies the maximum number of retries to attempt.

This attribute is optional. The default value is 10.

The exponentialBackoff Element

This element defines an exponential back-off retry strategy. The exponentialBackoff element is a child of the RetryPolicyConfiguration element. This element can occur zero or more times.

The following table lists the attributes of the exponentialBackoff element.

Attribute

Description

name

A string value that identifies the name of the retry strategy.

This attribute is required.

firstFastRetry

A Boolean value that determines whether the block should perform the first retry immediately.

This attribute is optional. The default value is true.

minBackoff

A timespan value that specifies the initial interval between retries.

This attribute is optional. The default value is "00:00:01."

maxBackoff

A timespan value that specifies the maximum interval permitted between retries.

This attribute is optional. The default value is "00:00:30."

deltaBackoff

A timespan value that specifies the delta to use when the block calculates the exponential intervals between retries.

This attribute is optional. The default value is "00:00:10."

maxRetryCount

An integer value that specifies the maximum number of retries to attempt.

This attribute is optional. The default value is 10.

The add Element

This element defines a custom retry strategy. The add element is a child of the RetryPolicyConfiguration element. This element can occur zero or more times.

The following table lists the attributes of the add element.

Attribute

Description

name

A string value that identifies the name of the retry strategy.

This attribute is required.

type

The custom retry strategy type. This class must extend the RetryStrategy class.

This attribute is required.

customAttribute1

A custom attribute name and value that you use to configure your custom retry strategy. Zero or more custom attributes are permitted.

maxRetryCount

An integer value that specifies the maximum number of retries to attempt.

This attribute is optional. The default value is 10.

Next Topic | Previous Topic | Home

Last built: June 7, 2012