SingletonExecutionOptions
AgentPrism.Abstractions.dllThe settings of single-executor election.
public sealed class SingletonExecutionOptionsInheritance
Section titled “Inheritance”object ← SingletonExecutionOptions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”They are read from the AgentPrism:SingletonExecution configuration section. See
AgentPrismServiceCollectionExtensions.AddAgentPrism.
Constructors
Section titled “Constructors”SingletonExecutionOptions()
Section titled “ SingletonExecutionOptions()”public SingletonExecutionOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”The name of the configuration section.
public const string SectionName = "AgentPrism:SingletonExecution"Field Value
Section titled “Field Value”Properties
Section titled “Properties”Enabled
Section titled “ Enabled”Gets or sets a value that turns on single-executor election. The default is false: behaviour does not change in a single-instance setup, and no query reaches the lease table.
public bool Enabled { get; set; }Property Value
Section titled “Property Value”LeaseDuration
Section titled “ LeaseDuration”Gets or sets the lease duration. Renewal happens at ONE THIRD of this duration; at half of it, a single missed renewal would drop the lease.
public TimeSpan LeaseDuration { get; set; }Property Value
Section titled “Property Value”OwnerId
Section titled “ OwnerId”Gets or sets the id of this instance. When it is null or empty it is generated automatically (machine name plus process id plus a unique suffix).
public string? OwnerId { get; set; }