public class SolrCloudClientFactory extends Object implements SolrClientFactory
CloudSolrClient clients. | Constructor and Description |
|---|
SolrCloudClientFactory() |
| Modifier and Type | Method and Description |
|---|---|
static Future<org.apache.solr.client.solrj.SolrClient> |
getClient(String zookeeperHosts,
String collection)
Creates a new
CloudSolrClient using the list of Zookeeper hosts and collection name
provided. |
Future<org.apache.solr.client.solrj.SolrClient> |
newClient(String core)
Requests the creation of a new
SolrClient for a specific Solr core name. |
public Future<org.apache.solr.client.solrj.SolrClient> newClient(String core)
SolrClientFactorySolrClient for a specific Solr core name. Future.get() will return null if a SolrClient could not be
created either immediately or after a retry period determined by the implementing class.
Clients of this class should consider implementing retry logic if needed based on that return
value.newClient in interface SolrClientFactorycore - name of the Solr core to createFuture used to retrieve the new SolrClient createdpublic static Future<org.apache.solr.client.solrj.SolrClient> getClient(String zookeeperHosts, String collection)
CloudSolrClient using the list of Zookeeper hosts and collection name
provided.zookeeperHosts - comma-separate list of Zookeeper hosts managing the Solr Cloud
configurationcollection - name of the collection to createFuture used to retrieve the new CloudSolrClient instanceThis work is licensed under a Creative Commons Attribution 4.0 International License.