This is an automated email from the ASF dual-hosted git repository.
jdyer pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 80cfd999c09 SOLR-17541: Deprecate
Http2SolrClient.Builder#withListenerFactory &
CloudHttpSolrClient.Builder#withHttpClient (only)
80cfd999c09 is described below
commit 80cfd999c0976e37ad0f1ae773600f19c5b3839a
Author: jdyer1 <[email protected]>
AuthorDate: Mon Dec 23 09:21:26 2024 -0600
SOLR-17541: Deprecate Http2SolrClient.Builder#withListenerFactory &
CloudHttpSolrClient.Builder#withHttpClient (only)
---
solr/CHANGES.txt | 5 +++--
.../solr/client/solrj/impl/CloudHttp2SolrClient.java | 2 ++
.../solr/client/solrj/impl/Http2SolrClient.java | 20 ++++++++++++++++++++
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index ae8945bea57..88071ca526b 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -50,13 +50,14 @@ Dependency Upgrades
Other Changes
---------------------
-(No changes)
-
* SOLR-17620: SolrCloud "live_node" now has metadata: version of Solr, roles
(Yuntong Qu, David Smiley)
* SOLR-17879: A Solr node will now fail to start if it's major.minor version
(e.g. 9.10) is *lower* than that of any existing
Solr node in a SolrCloud cluster (as reported by info in "live_node").
(David Smiley)
+* SOLR-17541: Deprecate `CloudHttp2SolrClient.Builder#withHttpClient` in favor
of `CloudHttp2SolrClient.Builder#withInternalClientBuilder`.
+ Deprecate `LBHttp2SolrClient.Builder#withListenerFactory` in favor of
`LBHttp2SolrClient.Builder#withListenerFactories`. (James Dyer)
+
================== 9.9.1 ==================
Bug Fixes
---------------------
diff --git
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
index 670bd2963ff..92a47fe6380 100644
---
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
+++
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
@@ -412,7 +412,9 @@ public class CloudHttp2SolrClient extends CloudSolrClient {
*
* @param httpClient http client
* @return this
+ * @deprecated Please use {@link
#withInternalClientBuilder(Http2SolrClient.Builder)}
*/
+ @Deprecated(since = "9.9")
public Builder withHttpClient(Http2SolrClient httpClient) {
if (this.internalClientBuilder != null) {
throw new IllegalStateException(
diff --git
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
index 48abe93e63b..5b7fbf1e62b 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
@@ -1078,6 +1078,26 @@ public class Http2SolrClient extends HttpSolrClientBase {
this.baseSolrUrl = baseSolrUrl;
}
+ /**
+ * Specify listener factories, which will replace any existing values.
+ *
+ * @param listenerFactories a list of HttpListenerFactory instances
+ * @return This Builder
+ */
+ public Http2SolrClient.Builder withListenerFactories(
+ List<HttpListenerFactory> listenerFactories) {
+ this.listenerFactory = listenerFactories;
+ return this;
+ }
+
+ /**
+ * Specify listener factories, which will replace any existing values.
+ *
+ * @param listenerFactory a list of HttpListenerFactory instances
+ * @return This Builder
+ * @deprecated Please use {@link #withListenerFactories(List)}
+ */
+ @Deprecated(since = "9.9")
public Http2SolrClient.Builder
withListenerFactory(List<HttpListenerFactory> listenerFactory) {
this.listenerFactory = listenerFactory;
return this;