public abstract class QosException
extends java.lang.RuntimeException
| Modifier and Type | Class and Description |
|---|---|
static class |
QosException.RetryOther
|
static class |
QosException.Throttle
See
throttle(). |
static class |
QosException.Unavailable
See
unavailable(). |
static interface |
QosException.Visitor<T> |
| Modifier and Type | Method and Description |
|---|---|
abstract <T> T |
accept(QosException.Visitor<T> visitor) |
static QosException.RetryOther |
retryOther(java.net.URL redirectTo)
Returns a
QosException.RetryOther exception indicating that the calling client should retry against the given node of
this service. |
static QosException.RetryOther |
retryOther(java.net.URL redirectTo,
java.lang.Throwable cause)
Like
retryOther(URL), but includes a cause. |
static QosException.Throttle |
throttle()
Returns a
QosException.Throttle exception indicating that the calling client should throttle its requests. |
static QosException.Throttle |
throttle(java.time.Duration duration)
Like
throttle(), but additionally requests that the client wait for at least the given duration before
retrying the request. |
static QosException.Throttle |
throttle(java.time.Duration duration,
java.lang.Throwable cause)
Like
throttle(Duration), but includes a cause. |
static QosException.Throttle |
throttle(java.lang.Throwable cause)
Like
throttle(), but includes a cause. |
static QosException.Unavailable |
unavailable()
An exception indicating that (this node of) this service is currently unavailable and the client may try again at
a later time, possibly against a different node of this service.
|
static QosException.Unavailable |
unavailable(java.lang.Throwable cause)
Like
unavailable(), but includes a cause. |
public abstract <T> T accept(QosException.Visitor<T> visitor)
public static QosException.Throttle throttle()
QosException.Throttle exception indicating that the calling client should throttle its requests. The client
may retry against an arbitrary node of this service.public static QosException.Throttle throttle(java.lang.Throwable cause)
throttle(), but includes a cause.public static QosException.Throttle throttle(java.time.Duration duration)
throttle(), but additionally requests that the client wait for at least the given duration before
retrying the request.public static QosException.Throttle throttle(java.time.Duration duration, java.lang.Throwable cause)
throttle(Duration), but includes a cause.public static QosException.RetryOther retryOther(java.net.URL redirectTo)
QosException.RetryOther exception indicating that the calling client should retry against the given node of
this service.public static QosException.RetryOther retryOther(java.net.URL redirectTo, java.lang.Throwable cause)
retryOther(URL), but includes a cause.public static QosException.Unavailable unavailable()
public static QosException.Unavailable unavailable(java.lang.Throwable cause)
unavailable(), but includes a cause.