Table of Contents

Class LeaderElectionAcquisitionFailedEventArgs

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

Event arguments raised when a leader election candidate fails to acquire leadership, either by losing the acquisition race to another candidate or because an error occurred during the acquisition attempt.

public sealed class LeaderElectionAcquisitionFailedEventArgs : EventArgs
Inheritance
LeaderElectionAcquisitionFailedEventArgs
Inherited Members
Extension Methods

Constructors

LeaderElectionAcquisitionFailedEventArgs(string, string, string, DateTimeOffset, Exception?)

Event arguments raised when a leader election candidate fails to acquire leadership, either by losing the acquisition race to another candidate or because an error occurred during the acquisition attempt.

public LeaderElectionAcquisitionFailedEventArgs(string candidateId, string resourceName, string reason, DateTimeOffset timestamp, Exception? exception = null)

Parameters

candidateId string

The identifier of the candidate whose acquisition attempt failed.

resourceName string

The name of the resource the candidate was contending for.

reason string

A short, human-readable description of why the acquisition failed.

timestamp DateTimeOffset

The time at which the failure occurred, supplied by the caller from its configured time source.

exception Exception

The exception that caused the failure, or null when the failure was a lost race rather than an error.

Properties

CandidateId

Gets the candidate ID whose acquisition attempt failed.

public string CandidateId { get; }

Property Value

string

the candidate ID whose acquisition attempt failed.

Exception

Gets the exception that caused the failure, if any.

public Exception? Exception { get; }

Property Value

Exception

the exception that caused the failure, or null when the failure was a lost race rather than an error.

Reason

Gets the reason the acquisition failed.

public string Reason { get; }

Property Value

string

a short, human-readable description of why the acquisition failed.

ResourceName

Gets the resource name the candidate was contending for.

public string ResourceName { get; }

Property Value

string

the resource name the candidate was contending for.

Timestamp

Gets when the failure occurred.

public DateTimeOffset Timestamp { get; }

Property Value

DateTimeOffset

when the failure occurred.