public class SdkConnectionKeepAliveStrategy extends Object implements ConnectionKeepAliveStrategy
| 构造器和说明 |
|---|
SdkConnectionKeepAliveStrategy(long maxIdleTime) |
public TimeValue getKeepAliveDuration(HttpResponse response, HttpContext context)
ConnectionKeepAliveStrategyConnectionReuseStrategy, if
ConnectionReuseStrategy.keepAlive(
org.apache.hc.core5.http.HttpRequest, HttpResponse, HttpContext) returns true,
this allows you to control how long the reuse will last. If keepAlive returns
false, this should have no meaningful impactgetKeepAliveDuration 在接口中 ConnectionKeepAliveStrategyresponse - The last response received over the connection.context - the context in which the connection is being used.Copyright © 2023. All rights reserved.