|
|
|
@ -53,6 +53,8 @@ import org.apache.http.impl.client.BasicCredentialsProvider;
|
|
|
|
|
import org.apache.http.impl.client.DefaultHttpClient;
|
|
|
|
|
import org.apache.http.impl.client.DefaultHttpRequestRetryHandler;
|
|
|
|
|
import org.apache.http.impl.conn.PoolingClientConnectionManager;
|
|
|
|
|
import org.apache.http.params.HttpConnectionParams;
|
|
|
|
|
import org.apache.http.params.HttpParams;
|
|
|
|
|
import org.apache.http.protocol.HttpContext;
|
|
|
|
|
import org.apache.solr.client.solrj.SolrServer;
|
|
|
|
|
import org.apache.solr.client.solrj.impl.HttpSolrServer;
|
|
|
|
@ -145,6 +147,9 @@ public class RemoteInstance implements SolrInstance {
|
|
|
|
|
return context;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
HttpParams params = this.client.getParams();
|
|
|
|
|
HttpConnectionParams.setConnectionTimeout(params, 10000);
|
|
|
|
|
HttpConnectionParams.setSoTimeout(params, 10000);
|
|
|
|
|
this.client.addRequestInterceptor(new HttpRequestInterceptor() {
|
|
|
|
|
@Override
|
|
|
|
|
public void process(final HttpRequest request, final HttpContext context) throws IOException {
|
|
|
|
|