Class Http2SolrClient.Builder
- java.lang.Object
-
- org.apache.solr.client.solrj.impl.Http2SolrClient.Builder
-
- Enclosing class:
- Http2SolrClient
public static class Http2SolrClient.Builder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected String
baseSolrUrl
protected RequestWriter
requestWriter
protected ResponseParser
responseParser
-
Method Summary
-
-
-
Field Detail
-
baseSolrUrl
protected String baseSolrUrl
-
requestWriter
protected RequestWriter requestWriter
-
responseParser
protected ResponseParser responseParser
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(String baseSolrUrl)
-
-
Method Detail
-
build
public Http2SolrClient build()
-
withHttpClient
public Http2SolrClient.Builder withHttpClient(Http2SolrClient httpClient)
ReusehttpClient
connections pool
-
withRequestWriter
public Http2SolrClient.Builder withRequestWriter(RequestWriter requestWriter)
Provides aRequestWriter
for created clients to use when handing requests.
-
withResponseParser
public Http2SolrClient.Builder withResponseParser(ResponseParser responseParser)
Provides aResponseParser
for created clients to use when handling requests.
-
withFollowRedirects
public Http2SolrClient.Builder withFollowRedirects(boolean followRedirects)
-
withExecutor
public Http2SolrClient.Builder withExecutor(ExecutorService executor)
-
withSSLConfig
public Http2SolrClient.Builder withSSLConfig(SSLConfig sslConfig)
-
withBasicAuthCredentials
public Http2SolrClient.Builder withBasicAuthCredentials(String user, String pass)
-
withTheseParamNamesInTheUrl
public Http2SolrClient.Builder withTheseParamNamesInTheUrl(Set<String> urlParamNames)
Expert Method- Parameters:
urlParamNames
- set of param keys that are only sent via the query string. Note that the param will be sent as a query string if the key is part of this Set or the SolrRequest's query params.- See Also:
SolrRequest.getQueryParams()
-
maxConnectionsPerHost
@Deprecated(since="9.2") public Http2SolrClient.Builder maxConnectionsPerHost(int max)
Deprecated.Please usewithMaxConnectionsPerHost(int)
Set maxConnectionsPerHost for http1 connections, maximum number http2 connections is limited to 4
-
withMaxConnectionsPerHost
public Http2SolrClient.Builder withMaxConnectionsPerHost(int max)
Set maxConnectionsPerHost for http1 connections, maximum number http2 connections is limited to 4
-
idleTimeout
@Deprecated(since="9.2") public Http2SolrClient.Builder idleTimeout(int idleConnectionTimeout)
Deprecated.Please usewithIdleTimeout(long, TimeUnit)
-
withIdleTimeout
public Http2SolrClient.Builder withIdleTimeout(long idleConnectionTimeout, TimeUnit unit)
-
useHttp1_1
public Http2SolrClient.Builder useHttp1_1(boolean useHttp1_1)
-
connectionTimeout
@Deprecated(since="9.2") public Http2SolrClient.Builder connectionTimeout(int connectionTimeout)
Deprecated.Please usewithConnectionTimeout(long, TimeUnit)
-
withConnectionTimeout
public Http2SolrClient.Builder withConnectionTimeout(long connectionTimeout, TimeUnit unit)
-
requestTimeout
@Deprecated(since="9.2") public Http2SolrClient.Builder requestTimeout(int requestTimeout)
Deprecated.Please usewithRequestTimeout(long, TimeUnit)
Set a timeout in milliseconds for requests issued by this client.- Parameters:
requestTimeout
- The timeout in milliseconds- Returns:
- this Builder.
-
withRequestTimeout
public Http2SolrClient.Builder withRequestTimeout(long requestTimeout, TimeUnit unit)
Set a timeout in milliseconds for requests issued by this client.- Parameters:
requestTimeout
- The timeout in milliseconds- Returns:
- this Builder.
-
-