Env: HttpClient 4.4.HttpClient Shared Verbindungsmanager
In HttpClientBuilder Klasse, kann ich folgenden Code sehen,
if (!this.connManagerShared){
// ...some code
if (this.evictExpiredConnections || this.evictIdleConnections) {
final IdleConnectionEvictor connectionEvictor = new IdleConnectionEvictor((HttpClientConnectionManager) connManagerCopy,
this.maxIdleTime > 0L ? this.maxIdleTime : 10L, this.maxIdleTimeUnit != null ? this.maxIdleTimeUnit : TimeUnit.SECONDS);
closeablesCopy1.add(new Closeable()
{
public void close() throws IOException
{
connectionEvictor.shutdown();
}
});
connectionEvictor.start();
}
// ...some code
}
ich nicht in der Lage bin, diese beiden Bedingungen zu korrelieren.
Warum hätten Sie IdleConnectionEvictor nicht, wenn Sie einen gemeinsamen Verbindungsmanager verwenden?