Package com.tnsai.llm.resilience
Class CircuitOpenException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tnsai.llm.resilience.CircuitOpenException
- All Implemented Interfaces:
Serializable
Thrown when a request is rejected because the circuit breaker is open.
This exception signals that the underlying LLM provider has been
temporarily removed from service due to consecutive failures.
When used with FallbackRouter,
this causes the router to skip to the next provider.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCircuitOpenException(String model, int failureCount, Duration recoveryTimeout, Instant openedAt) -
Method Summary
Modifier and TypeMethodDescriptionintgetModel()Returns the estimated time remaining until the circuit transitions to HALF_OPEN.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CircuitOpenException
-
-
Method Details
-
getModel
-
getFailureCount
public int getFailureCount() -
getRecoveryTimeout
-
getOpenedAt
-
getRemainingRecoveryTime
Returns the estimated time remaining until the circuit transitions to HALF_OPEN.
-