Table of Contents

Interface ITransportCircuitBreakerDiagnostics

Namespace
Excalibur.Dispatch.Resilience
Assembly
Excalibur.Dispatch.dll

Provides diagnostic and administrative operations for the transport circuit breaker registry. Test an ITransportCircuitBreakerRegistry instance for this interface to reach it.

public interface ITransportCircuitBreakerDiagnostics
Extension Methods

Properties

Count

Gets the number of registered circuit breakers.

int Count { get; }

Property Value

int

Methods

GetAllStates()

Gets the current states of all registered circuit breakers.

IReadOnlyDictionary<string, CircuitState> GetAllStates()

Returns

IReadOnlyDictionary<string, CircuitState>

A dictionary mapping transport names to their circuit states.

GetTransportNames()

Gets the names of all registered transports.

IEnumerable<string> GetTransportNames()

Returns

IEnumerable<string>

A collection of transport names.

Remove(string)

Removes a circuit breaker for the specified transport.

bool Remove(string transportName)

Parameters

transportName string

The name of the transport.

Returns

bool

True if the circuit breaker was removed; otherwise, false.

Exceptions

ArgumentNullException

transportName is null.

ArgumentException

transportName is empty or consists only of white-space characters.

ResetAllAsync(CancellationToken)

Returns every registered circuit breaker to the closed state.

Task ResetAllAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task

A task that completes once every circuit is closed.

Remarks

When the returned task completes, every circuit this registry holds reports Closed. The individual resets are awaited rather than started, so a caller that needs the whole registry back in service can wait for exactly that.