epugh commented on code in PR #1211:
URL: https://github.com/apache/solr/pull/1211#discussion_r1039667900
##########
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:
are you suggesting that maybe these methods aren't actually needed? because
you would never set them in the LBHttp2SolrClient, you would do this in the
Http2SolrClient that underlies it? That does intuitively make sense...
--
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]