Class BackoffRule
Definition
Namespace: StardewUI.Framework
Assembly: StardewUI.dll
Defines the rules for exponential backoff.
Inheritance
Object ⇦ BackoffRule
Members
Constructors
Name | Description |
---|---|
BackoffRule(TimeSpan, TimeSpan, Single) | Defines the rules for exponential backoff. |
Fields
Name | Description |
---|---|
Default | Standard backoff rule deemed suitable for most types of UI retries. |
Properties
Name | Description |
---|---|
InitialDuration | Gets the duration to wait before the first retry attempt. |
Methods
Name | Description |
---|---|
GetNextDuration(TimeSpan) | Gets the duration to wait before the next retry attempt. |
Details
Constructors
BackoffRule(TimeSpan, TimeSpan, float)
Defines the rules for exponential backoff.
Parameters
initialDuration
TimeSpan
Duration to wait before the first retry attempt.
maxDuration
TimeSpan
Maximum duration to wait before any retry attempt; i.e. no matter how many retries have already occurred for a given key, it will not extend the duration any longer than this.
multiplier
Single
Amount to multiply the current duration on each subsequent retry, starting from initialDuration
and going no higher than maxDuration
.
Fields
Default
Standard backoff rule deemed suitable for most types of UI retries.
Field Value
Remarks
Uses an initial delay of 50 ms, maximum delay of 5 s, and multiplier of 4.
Properties
InitialDuration
Gets the duration to wait before the first retry attempt.
Property Value
Methods
GetNextDuration(TimeSpan)
Gets the duration to wait before the next retry attempt.
Parameters
previousDuration
TimeSpan
The wait duration that was used on the previous attempt.