Class SolrClientBuilder<B extends SolrClientBuilder<B>>
- java.lang.Object
-
- org.apache.solr.client.solrj.impl.SolrClientBuilder<B>
-
- Direct Known Subclasses:
CloudSolrClient.Builder,ConcurrentUpdateSolrClient.Builder,HttpSolrClient.Builder,LBHttpSolrClient.Builder
public abstract class SolrClientBuilder<B extends SolrClientBuilder<B>> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected IntegerconnectionTimeoutMillisprotected org.apache.http.client.HttpClienthttpClientprotected ResponseParserresponseParserprotected IntegersocketTimeoutMillis
-
Constructor Summary
Constructors Constructor Description SolrClientBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract BgetThis()The solution for the unchecked cast warning.BwithConnectionTimeout(int connectionTimeoutMillis)TellsHttpSolrClient.Builderthat created clients should obey the following timeout when connecting to Solr servers.BwithHttpClient(org.apache.http.client.HttpClient httpClient)Provides aHttpClientfor the builder to use when creating clients.BwithResponseParser(ResponseParser responseParser)Provides aResponseParserfor created clients to use when handling requests.BwithSocketTimeout(int socketTimeoutMillis)TellsHttpSolrClient.Builderthat created clients should set the following read timeout on all sockets.
-
-
-
Field Detail
-
httpClient
protected org.apache.http.client.HttpClient httpClient
-
responseParser
protected ResponseParser responseParser
-
connectionTimeoutMillis
protected Integer connectionTimeoutMillis
-
socketTimeoutMillis
protected Integer socketTimeoutMillis
-
-
Method Detail
-
getThis
public abstract B getThis()
The solution for the unchecked cast warning.
-
withHttpClient
public B withHttpClient(org.apache.http.client.HttpClient httpClient)
Provides aHttpClientfor the builder to use when creating clients.
-
withResponseParser
public B withResponseParser(ResponseParser responseParser)
Provides aResponseParserfor created clients to use when handling requests.
-
withConnectionTimeout
public B withConnectionTimeout(int connectionTimeoutMillis)
TellsHttpSolrClient.Builderthat created clients should obey the following timeout when connecting to Solr servers.For valid values see
RequestConfig.getConnectTimeout()
-
withSocketTimeout
public B withSocketTimeout(int socketTimeoutMillis)
TellsHttpSolrClient.Builderthat created clients should set the following read timeout on all sockets.For valid values see
RequestConfig.getSocketTimeout()
-
-