public class DefaultSolrClientProvider extends AbstractLogEnabled implements SolrClientProvider, Component, Serviceable, Initializable, Disposable
| Modifier and Type | Field and Description | 
|---|---|
private static String | 
__SOLR_CORE_PREFIX_CONFIG  | 
private static String | 
__SOLR_URL_CONFIG  | 
protected String | 
_solrCorePrefix
The solr core prefix. 
 | 
protected SolrClient | 
_solrReadClient
The Solr read client. 
 | 
protected Map<String,SolrClient> | 
_solrUpdateClients
The Solr update clients, per workspace 
 | 
protected WorkspaceSelector | 
_workspaceSelector
The workspace selector. 
 | 
ROLE| Constructor and Description | 
|---|
DefaultSolrClientProvider()  | 
| Modifier and Type | Method and Description | 
|---|---|
private SolrClient | 
_createUpdateClient(String url,
                   String workspaceName)  | 
private String | 
_nonNullWorkspaceName(String workspaceName)  | 
void | 
dispose()  | 
String | 
getCollectionName()
Get the name of the collection to use. 
 | 
String | 
getCollectionName(String workspaceName)
Get the collection to use. 
 | 
SolrClient | 
getReadClient()
Get the "read" mode solr client. 
 | 
SolrClient | 
getUpdateClient(String workspaceName)
Get a Solr client suited to update. 
 | 
void | 
initialize()  | 
void | 
service(ServiceManager serviceManager)  | 
getLogger, setLoggerprivate static final String __SOLR_URL_CONFIG
private static final String __SOLR_CORE_PREFIX_CONFIG
protected WorkspaceSelector _workspaceSelector
protected SolrClient _solrReadClient
protected Map<String,SolrClient> _solrUpdateClients
protected String _solrCorePrefix
public DefaultSolrClientProvider()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void initialize() throws Exception
initialize in interface InitializableExceptionprivate SolrClient _createUpdateClient(String url, String workspaceName)
public void dispose()
dispose in interface Disposablepublic SolrClient getReadClient()
SolrClientProvidergetReadClient in interface SolrClientProviderpublic SolrClient getUpdateClient(String workspaceName)
SolrClientProvidergetUpdateClient in interface SolrClientProviderworkspaceName - The name of the workspacepublic String getCollectionName()
SolrClientProvidergetCollectionName in interface SolrClientProviderpublic String getCollectionName(String workspaceName)
SolrClientProvidergetCollectionName in interface SolrClientProviderworkspaceName - The workspace name.private String _nonNullWorkspaceName(String workspaceName)