Class GroupLockOptions
- Namespace
- Virtufin.WorkManager.Configuration
- Assembly
- Virtufin.WorkManager.dll
Group lock acquisition tuning. All values are configurable via environment variables; defaults are tuned for the typical "two workers contending for a single group lock" scenario.
public sealed record GroupLockOptions : IEquatable<GroupLockOptions>
- Inheritance
-
GroupLockOptions
- Implements
- Inherited Members
Fields
DefaultMaxRetries
Default max acquire attempts before throwing LockContentionException.
public const int DefaultMaxRetries = 3
Field Value
DefaultRetryBaseDelayMs
Default base delay between acquire attempts (doubles each retry).
public const int DefaultRetryBaseDelayMs = 500
Field Value
MaxRetriesEnvVar
Environment variable name for MaxRetries.
public const string MaxRetriesEnvVar = "GROUP_LOCK_MAX_RETRIES"
Field Value
RetryBaseDelayMsEnvVar
Environment variable name for RetryBaseDelayMs.
public const string RetryBaseDelayMsEnvVar = "GROUP_LOCK_RETRY_BASE_DELAY_MS"
Field Value
Properties
MaxRetries
Max acquire attempts before throwing LockContentionException.
public int MaxRetries { get; init; }
Property Value
RetryBaseDelayMs
Base delay between acquire attempts; the actual delay is RetryBaseDelay * 2^attempt.
public int RetryBaseDelayMs { get; init; }
Property Value
Methods
FromEnvironment(Func<string, string?>)
Reads options from the supplied environment-variable provider. Falls back to defaults when keys are absent or malformed.
public static GroupLockOptions FromEnvironment(Func<string, string?> getEnvironment)