CircuitBreakerOptions class
Configuration options for a circuit breaker.
Controls the thresholds and timeouts that determine when the circuit breaker transitions between states, and which exceptions should be ignored.
Constructors
Properties
- failureThreshold → int
-
Number of consecutive failures required to open the circuit.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
ignoreExceptions
→ List<
Type> -
List of exception types that should not trip the circuit breaker.
final
- resetTimeout → Duration
-
Duration to wait before attempting to reset the circuit (transition to Half-Open).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- successThreshold → int
-
Number of consecutive successes required in Half-Open state to close the circuit.
final
Methods
-
copyWith(
{int? failureThreshold, Duration? resetTimeout, int? successThreshold, List< Type> ? ignoreExceptions}) → CircuitBreakerOptions - Creates a copy with updated values.
-
isIgnored(
Object exception) → bool - Determines if an exception should be ignored by the circuit breaker.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited