Package com.shri.restinpeace.exception
Class CircuitOpenException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.shri.restinpeace.exception.RestInPeaceException
com.shri.restinpeace.exception.CircuitOpenException
- All Implemented Interfaces:
Serializable
Thrown instead of making a call when its client's
circuit breaker is open -
the downstream has recently shown a high enough failure rate that this
call is refused immediately, without attempting the network call (or even
a cache lookup), rather than paying the cost of finding out it would have
failed too. Not a RestInPeaceHttpException: no actual HTTP
response exists for a call that was never attempted.
Never worth retrying within the same open window - every attempt would
fail identically until the breaker's cooldown elapses - so
@Retry treats this exception as immediately terminal instead of
retryable, unlike a transport failure or a matching status code.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCircuitOpenException(String message) Creates an exception with a message describing which client refused the call. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CircuitOpenException
Creates an exception with a message describing which client refused the call.- Parameters:
message- a description of which client's breaker is open
-