[
https://issues.apache.org/jira/browse/SOLR-5604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13903452#comment-13903452
]
Karl Wright commented on SOLR-5604:
-----------------------------------
Hmm. Thinking further about this, one of the advantages of the current SolrJ
API (which optionally accepts a configured HttpClient object) is that you can
keep the HttpClient object around, and it won't get repeatedly recreated. If
you simply substituted a builder (or Configurer) object instead, you guarantee
that recreation of the HttpClient class would occur on every SolrJ call. (I
take it that SolrJ needs to configure the HttpClient object further and that is
where the problem lies when switching over to the builder paradigm.)
An alternative would be to create a class that has two members: an HttpClient
reference, and a builder (or Configurer). This class would be used wherever
HttpClient is used right now. The HttpClient reference would be initialized
the first time it is needed, and subsequent changes to the builder/Configurer
would either be flagged as illegal, or would force a new HttpClient instance to
be created to replace the existing one.
I think this meets all the criteria... please let me know if I am wrong.
> Remove deprecations caused by httpclient 4.3.x upgrade
> ------------------------------------------------------
>
> Key: SOLR-5604
> URL: https://issues.apache.org/jira/browse/SOLR-5604
> Project: Solr
> Issue Type: Improvement
> Affects Versions: 4.7
> Reporter: Shawn Heisey
> Fix For: 4.7, 5.0
>
> Attachments: SOLR-5604-4x-just-lucene.patch
>
>
> SOLR-5590 upgraded httpclient in Solr and Lucene to version 4.3.x. This
> version deprecates a LOT of classes and methods, recommending that they all
> be replaced with various methods from the HttpClientBuilder class.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]