dsmiley commented on code in PR #1211:
URL: https://github.com/apache/solr/pull/1211#discussion_r1039855030


##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttp2SolrClient.java:
##########
@@ -258,4 +299,32 @@ public void onFailure(Throwable oe) {
               }
             });
   }
+
+  public static class Builder {
+    private final Http2SolrClient http2Client;
+    private final String[] baseSolrUrls;
+    private ResponseParser responseParser;
+    private RequestWriter requestWriter;
+
+    public Builder(Http2SolrClient http2Client, String... baseSolrUrls) {
+      this.http2Client = http2Client;
+      this.baseSolrUrls = baseSolrUrls;
+    }
+
+    /** Provides a {@link ResponseParser} for created clients to use when 
handling requests. */
+    public LBHttp2SolrClient.Builder withResponseParser(ResponseParser 
responseParser) {
+      this.responseParser = responseParser;
+      return this;
+    }
+
+    /** Provides a {@link RequestWriter} for created clients to use when 
handing requests. */
+    public LBHttp2SolrClient.Builder withRequestWriter(RequestWriter 
requestWriter) {
+      this.requestWriter = requestWriter;
+      return this;
+    }

Review Comment:
   Yes; I think @stillalex identified this as well just now.  I left a comment 
a minute ago that I hope succinctly makes the point:
   > In general, we don't want fields on LBSolrClient and its subclasses (there 
are two) that are redundant with that of the client/builder it delegates to. 
It'll add confusion as to which one is real/used vs shadowed.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to