Table of Contents

Class LeaderElectionOptionsValidator

Namespace
Excalibur.Dispatch.LeaderElection
Assembly
Excalibur.Dispatch.LeaderElection.Abstractions.dll

Validates LeaderElectionOptions cross-property constraints.

public sealed class LeaderElectionOptionsValidator : IValidateOptions<LeaderElectionOptions>
Inheritance
LeaderElectionOptionsValidator
Implements
Inherited Members
Extension Methods

Remarks

Ensures:

  • All four timing values are positive.
  • RenewInterval is less than LeaseDuration.
  • GracePeriod is less than LeaseDuration.
  • The configured timing budget (RenewInterval + GracePeriod + a clock-skew margin) is strictly less than LeaseDuration. This validates configuration headroom only; it does not prove a runtime deadline, bound a provider call, or establish substrate ownership. Providers must enforce their own renewal/verification deadlines and actual backend lease rules.

Methods

Validate(string?, LeaderElectionOptions)

Validates a specified named options instance (or all if name is null).

public ValidateOptionsResult Validate(string? name, LeaderElectionOptions options)

Parameters

name string

The name of the options instance being validated.

options LeaderElectionOptions

The options instance.

Returns

ValidateOptionsResult

The ValidateOptionsResult result.