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 bc94ca3012d SOLR-17541: Deprecate 
Http2SolrClient.Builder#withListenerFactory & 
CloudHttpSolrClient.Builder#withHttpClient (only)
bc94ca3012d is described below

commit bc94ca3012de98752d88e8cd7ba3f4e4ac75ac66
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, 26 insertions(+), 1 deletion(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index e0873adb578..458de3cae9c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -11,7 +11,10 @@ New Features
 
 Improvements
 ---------------------
-(No changes)
+* SOLR-17541: Deprecate `CloudHttp2SolrClient.Builder#withHttpClient` in favor 
of
+  `CloudHttp2SolrClient.Builder#withInternalClientBuilder`.
+   Deprecate `LBHttp2SolrClient.Builder#withListenerFactory` in favor of
+   `LBHttp2SolrClient.Builder#withListenerFactories` (James Dyer)
 
 Optimizations
 ---------------------
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 cf8415ee64c..8e692e8cdd9 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
@@ -1018,6 +1018,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;

Reply via email to