Class ClosedState<R>
java.lang.Object
dev.failsafe.internal.CircuitState<R>
dev.failsafe.internal.ClosedState<R>
-
Field Summary
Fields inherited from class CircuitState
breaker, config, stats -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcapacityFor(CircuitBreaker<?> breaker) Returns the capacity of the breaker in the closed state.(package private) voidcheckThreshold(ExecutionContext<R> context) Checks to see if the executions and failure thresholds have been exceeded, opening the circuit if so.getState()voidbooleanMethods inherited from class CircuitState
getRemainingDelay, getStats, recordFailure, recordSuccess, releasePermit
-
Constructor Details
-
ClosedState
-
-
Method Details
-
tryAcquirePermit
public boolean tryAcquirePermit()- Specified by:
tryAcquirePermitin classCircuitState<R>
-
getState
- Specified by:
getStatein classCircuitState<R>
-
handleConfigChange
public void handleConfigChange()- Overrides:
handleConfigChangein classCircuitState<R>
-
checkThreshold
Checks to see if the executions and failure thresholds have been exceeded, opening the circuit if so.- Overrides:
checkThresholdin classCircuitState<R>
-
capacityFor
Returns the capacity of the breaker in the closed state.
-