Class DelayedRetryRequestDroppedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.servicetalk.capacity.limiter.api.RequestDroppedException
io.servicetalk.traffic.resilience.http.DelayedRetryRequestDroppedException
- All Implemented Interfaces:
DelayedRetryException
,Serializable
public final class DelayedRetryRequestDroppedException
extends RequestDroppedException
implements DelayedRetryException
A
RequestDroppedException
to indicate that a request was dropped by a server due to capacity constraints and
requires a client to delay its retry.
This error reflects the client side application logic and its interpretation of a service response; meaning that
its up to the application to declare whether a HttpResponseStatus.TOO_MANY_REQUESTS
is a safe-to-retry
response, and if so after how much delay()
.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance.DelayedRetryRequestDroppedException
(Duration delay, String message) Creates a new instance.DelayedRetryRequestDroppedException
(Duration delay, String message, Throwable cause) Creates a new instance.DelayedRetryRequestDroppedException
(Duration delay, String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) Creates a new instance.DelayedRetryRequestDroppedException
(Duration delay, Throwable cause) Creates a new instance. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DelayedRetryRequestDroppedException
Creates a new instance.- Parameters:
delay
- The delay to be provided as input to a retry mechanism.
-
DelayedRetryRequestDroppedException
Creates a new instance.- Parameters:
delay
- The delay to be provided as input to a retry mechanism.message
- the detail message.
-
DelayedRetryRequestDroppedException
public DelayedRetryRequestDroppedException(Duration delay, @Nullable String message, @Nullable Throwable cause) Creates a new instance.- Parameters:
delay
- The delay to be provided as input to a retry mechanism.message
- the detail message.cause
- of this exception.
-
DelayedRetryRequestDroppedException
Creates a new instance.- Parameters:
delay
- The delay to be provided as input to a retry mechanism.cause
- of this exception.
-
DelayedRetryRequestDroppedException
public DelayedRetryRequestDroppedException(Duration delay, @Nullable String message, @Nullable Throwable cause, boolean enableSuppression, boolean writableStackTrace) Creates a new instance.- Parameters:
delay
- The delay to be provided as input to a retry mechanism.message
- the detail message.cause
- of this exception.enableSuppression
-true
if suppression should be enabled.writableStackTrace
-true
if the stack trace should be writable
-
-
Method Details
-
delay
Description copied from interface:DelayedRetryException
A constant delay to apply.- Specified by:
delay
in interfaceDelayedRetryException
- Returns:
- The
Duration
to apply as constant delay when retrying
-
throwable
Description copied from interface:DelayedRetryException
Returns originalThrowable
thisDelayedRetryException
represents.- Specified by:
throwable
in interfaceDelayedRetryException
- Returns:
- the original
Throwable
-