Interface CircuitState
- All Known Implementing Classes:
CircuitState.Closed,CircuitState.HalfOpen,CircuitState.Open
public sealed interface CircuitState
permits CircuitState.Closed, CircuitState.Open, CircuitState.HalfOpen
The state of a
CircuitBreaker at a point in time. Closed, Open, and HalfOpen are the
only possible states, modeled as a closed hierarchy so callers can pattern-match exhaustively.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordCalls pass through normally while their outcomes are recorded in the sliding window.static final recordA limited number of test calls are let through to probe whether the downstream has recovered.static final recordCalls are rejected immediately.