if (ref == null) {
// no then create new servers
ref = new SolrComponent.SolrServerReference();
CloudSolrServer cloudServer = getCloudServer();
if (cloudServer == null) {
HttpSolrServer solrServer = new HttpSolrServer(url);
ConcurrentUpdateSolrServer solrStreamingServer = new ConcurrentUpdateSolrServer(url, streamingQueueSize, streamingThreadCount);
// set the properties on the solr server
if (maxRetries != null) {
solrServer.setMaxRetries(maxRetries);
}
if (soTimeout != null) {
solrServer.setSoTimeout(soTimeout);
}
if (connectionTimeout != null) {
solrServer.setConnectionTimeout(connectionTimeout);
}
if (defaultMaxConnectionsPerHost != null) {
solrServer.setDefaultMaxConnectionsPerHost(defaultMaxConnectionsPerHost);
}
if (maxTotalConnections != null) {
solrServer.setMaxTotalConnections(maxTotalConnections);
}
if (followRedirects != null) {
solrServer.setFollowRedirects(followRedirects);
}
if (allowCompression != null) {
solrServer.setAllowCompression(allowCompression);
}
ref.setSolrServer(solrServer);
ref.setUpdateSolrServer(solrStreamingServer);
}
ref.setCloudSolrServer(cloudServer);