Class LeaderElectionEventArgs
- Namespace
- Excalibur.Dispatch.LeaderElection
- Assembly
- Excalibur.Dispatch.LeaderElection.Abstractions.dll
Event arguments for leader election events.
public sealed class LeaderElectionEventArgs : EventArgs
- Inheritance
-
LeaderElectionEventArgs
- Inherited Members
- Extension Methods
Constructors
LeaderElectionEventArgs(string, string, DateTimeOffset?)
Event arguments for leader election events.
public LeaderElectionEventArgs(string candidateId, string resourceName, DateTimeOffset? timestamp = null)
Parameters
candidateIdstringThe identifier of the candidate involved in the election event.
resourceNamestringThe name of the resource for which the election is being conducted.
timestampDateTimeOffset?When the event occurred, supplied by the caller from its configured time source. Omit it to read the system clock. An election that was given a TimeProvider passes that provider's time, so a caller controlling the clock sees the same instant here as on the election's own properties.
Properties
CandidateId
Gets the candidate ID involved in the event.
public string CandidateId { get; }
Property Value
- string
the candidate ID involved in the event.
ResourceName
Gets the resource name.
public string ResourceName { get; }
Property Value
- string
the resource name.
Timestamp
Gets when the event occurred.
public DateTimeOffset Timestamp { get; }
Property Value
- DateTimeOffset
when the event occurred.