RetryPolicyInfo
Ecng.Net
Provides configuration information for retry policies, including retry counts and delays.
属性
InitialDelay
public TimeSpan InitialDelay { get; set; }
value = retryPolicyInfo.InitialDelay
retryPolicyInfo.InitialDelay = value
Gets or sets the initial delay to wait between retry attempts.
MaxDelay
public TimeSpan MaxDelay { get; set; }
value = retryPolicyInfo.MaxDelay
retryPolicyInfo.MaxDelay = value
Gets or sets the maximum delay allowed between retry attempts.
ReadMaxCount
public int ReadMaxCount { get; set; }
value = retryPolicyInfo.ReadMaxCount
retryPolicyInfo.ReadMaxCount = value
Gets or sets the maximum number of retry attempts for read operations.
Track
public ISet<SocketError> Track { get; }
value = retryPolicyInfo.Track
Gets the set of socket errors for which retry attempts should be tracked.
WriteMaxCount
public int WriteMaxCount { get; set; }
value = retryPolicyInfo.WriteMaxCount
retryPolicyInfo.WriteMaxCount = value
Gets or sets the maximum number of retry attempts for write operations.
方法
LoadAsync
public Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = retryPolicyInfo.LoadAsync(storage, cancellationToken)
Asynchronously loads the state of the object from the specified SettingsStorage.
- storage
- The SettingsStorage instance from which to load the data.
- cancellationToken
- A token to monitor for cancellation requests.
返回值: A task that represents the asynchronous load operation.
SaveAsync
public Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = retryPolicyInfo.SaveAsync(storage, cancellationToken)
Asynchronously saves the state of the object to the specified SettingsStorage.
- storage
- The SettingsStorage instance to which to save the data.
- cancellationToken
- A token to monitor for cancellation requests.
返回值: A task that represents the asynchronous save operation.