public class NullBackoffStrategy extends java.lang.Object implements ConnectionBackoffStrategy
ConnectionBackoffStrategy that never backs off,
for compatibility with existing behavior.| 构造器和说明 |
|---|
NullBackoffStrategy() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
shouldBackoff(HttpResponse resp)
Determines whether receiving the given
HttpResponse as
a result of request execution should result in a backoff
signal. |
boolean |
shouldBackoff(java.lang.Throwable t)
Determines whether seeing the given
Throwable as
a result of request execution should result in a backoff
signal. |
public boolean shouldBackoff(java.lang.Throwable t)
ConnectionBackoffStrategyThrowable as
a result of request execution should result in a backoff
signal.shouldBackoff 在接口中 ConnectionBackoffStrategyt - the Throwable that happenedtrue if a backoff signal should be
givenpublic boolean shouldBackoff(HttpResponse resp)
ConnectionBackoffStrategyHttpResponse as
a result of request execution should result in a backoff
signal. Implementations MUST restrict themselves to examining
the response header and MUST NOT consume any of the response
body, if any.shouldBackoff 在接口中 ConnectionBackoffStrategyresp - the HttpResponse that was receivedtrue if a backoff signal should be
given