Sets consecutive failure threshold.
Breaker transitions from CLOSED to OPEN when this threshold is reached.
| n |
failure threshold. |
|
Result.ok(this breaker), or Result.error(CircuitBreakerError.INVALID_ARGUMENT) when n is not positive. |