Class RetryInterruptedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.teceli.resiliencia.core.api.ResilientException
io.github.teceli.resiliencia.patterns.retry.RetryInterruptedException
- All Implemented Interfaces:
Serializable
Thrown by the Retry pattern when the thread is interrupted while waiting for a backoff delay
between attempts. Distinct from
RetryExhaustedException (the attempt budget ran out) and
RetryRejectedException (shouldRetry declined to retry): interruption stops the
loop for a reason unrelated to either. The cause is the last failure that was about to be
retried, not the interrupt itself — the interrupt is a control signal, not a failure. The
thread's interrupt status is restored before this exception is thrown.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintTotal number of attempts made before the interrupt arrived, including the first call.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RetryInterruptedException
-
-
Method Details
-
attemptCount
public int attemptCount()Total number of attempts made before the interrupt arrived, including the first call.
-