Class SyncAppDataResilienceConfiguration
- Namespace
- OpenSettings.Configurations
- Assembly
- OpenSettings.dll
Configuration for resilience settings when synchronizing application data.
public class SyncAppDataResilienceConfiguration
- Inheritance
-
SyncAppDataResilienceConfiguration
- Inherited Members
Properties
AttemptTimeout
Gets or sets the timeout for each individual attempt to sync app data.
public TimeSpan? AttemptTimeout { get; set; }
Property Value
Remarks
The default value is 'null
' which refer to indefinite timeout.
BackoffType
Gets or sets the type of backoff strategy to use for retrying failed sync app data operations.
public DelayBackoffType BackoffType { get; set; }
Property Value
MaxRetryAttempts
Gets or sets the maximum number of retries for initial syncing data. The retry behavior is determined as follows:
-
0
or any negative value other than-1
: No retries (operation will fail immediately on failure). -
-1
: Infinite retries (operation will continue retrying until success). - Any positive integer: Retry up to the specified number of attempts.
By default, the value is -1
, which means infinite retries. Negative values other than -1
are interpreted as "no retries" (equivalent to 0
retries), while -1
signifies infinite retries.
If set to a positive value, the system will attempt the operation that many times before giving up.
public int MaxRetryAttempts { get; set; }
Property Value
Exceptions
- MaxRetryExceededException
When the max retry attempts is reached.
MaxRetryDelay
Gets or sets the maximum delay time between retry attempts when a sync app data operation fails. Only used if BackoffType is set to Linear or Exponential.
public TimeSpan? MaxRetryDelay { get; set; }
Property Value
RetryDelay
Gets or sets the delay time between retry attempts when a sync app data operation fails.
public TimeSpan RetryDelay { get; set; }
Property Value
- TimeSpan
The timespan to wait before retrying a failed sync app data operation. The default value is
1000ms
.
TotalTimeout
Gets or sets the total timeout for the sync app data operation. This is the maximum time allowed for the entire operation to complete, including all retries.
public TimeSpan? TotalTimeout { get; set; }
Property Value
Remarks
The default value is 'null
' which refer to indefinite timeout.
If the total timeout is reached, a OpenSettings.Exceptions.TotalTimeoutExceededException will be thrown.
Exceptions
- TotalTimeoutExceededException
When the total timeout is reached.
UseJitter
Gets or sets a value indicating whether to use jitter in the delay between retry attempts. The jitter uses a random factor to vary the delay time, which can help to avoid thundering herd problems in distributed systems.
public bool UseJitter { get; set; }