Table of Contents

Class CacheCircuitBreakerOptions

Namespace
Excalibur.Dispatch.Caching
Assembly
Excalibur.Dispatch.Caching.dll

Circuit breaker configuration for cache resilience.

public sealed class CacheCircuitBreakerOptions
Inheritance
CacheCircuitBreakerOptions
Inherited Members
Extension Methods

Properties

BreakDuration

Gets or sets how long the circuit stays open before attempting recovery. Default is 30 seconds.

public TimeSpan BreakDuration { get; set; }

Property Value

TimeSpan

How long the circuit stays open before attempting recovery.

Enabled

Gets or sets a value indicating whether the circuit breaker is enabled. Default is true.

public bool Enabled { get; set; }

Property Value

bool

true if the circuit breaker is enabled; otherwise, false.

FailureThreshold

Gets or sets the number of consecutive failures before opening the circuit. Default is 5.

[Range(1, 1000)]
public int FailureThreshold { get; set; }

Property Value

int

The number of consecutive failures before opening the circuit.

FailureWindow

Gets or sets the time window for counting failures. Default is 1 minute.

public TimeSpan FailureWindow { get; set; }

Property Value

TimeSpan

The time window for counting failures.

HalfOpenSuccessThreshold

Gets or sets the number of successful requests needed to close the circuit from half-open. Default is 2.

[Range(1, 100)]
public int HalfOpenSuccessThreshold { get; set; }

Property Value

int

The number of successful requests needed to close the circuit from half-open.

HalfOpenTestLimit

Gets or sets the maximum number of test requests allowed in half-open state. Default is 3.

[Range(1, 100)]
public int HalfOpenTestLimit { get; set; }

Property Value

int

The maximum number of test requests allowed in half-open state.