stillalex commented on code in PR #1835: URL: https://github.com/apache/solr/pull/1835#discussion_r1292328321
########## solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java: ########## @@ -40,85 +43,131 @@ * * <p>TODO: Cut this over to using Solr's new Http2 clients */ -public class SolrClientCache implements Serializable { +public class SolrClientCache implements Serializable, Closeable { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - private final Map<String, SolrClient> solrClients = new HashMap<>(); - private final HttpClient httpClient; // Set the floor for timeouts to 60 seconds. // Timeouts cans be increased by setting the system properties defined below. - private static final int conTimeout = - Math.max( - Integer.parseInt(System.getProperty(HttpClientUtil.PROP_CONNECTION_TIMEOUT, "60000")), - 60000); - private static final int socketTimeout = + private static final int MIN_TIMEOUT = 60000; + private static final int minConnTimeout = Math.max( - Integer.parseInt(System.getProperty(HttpClientUtil.PROP_SO_TIMEOUT, "60000")), 60000); + Integer.getInteger(HttpClientUtil.PROP_CONNECTION_TIMEOUT, MIN_TIMEOUT), MIN_TIMEOUT); + private static final int minSocketTimeout = + Math.max(Integer.getInteger(HttpClientUtil.PROP_SO_TIMEOUT, MIN_TIMEOUT), MIN_TIMEOUT); + + private final Map<String, SolrClient> solrClients = new HashMap<>(); + private final HttpClient httpClient; Review Comment: rename done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org