Package org.alfresco.repo.solr
Class SOLRAdminClient
java.lang.Object
org.alfresco.repo.search.impl.solr.AbstractSolrAdminHTTPClient
org.alfresco.repo.solr.SOLRAdminClient
- All Implemented Interfaces:
SolrAdminClientInterface,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationEventPublisherAware
public class SOLRAdminClient
extends AbstractSolrAdminHTTPClient
implements org.springframework.context.ApplicationEventPublisherAware, org.springframework.beans.factory.DisposableBean, SolrAdminClientInterface
Provides an interface to the Solr admin APIs, used by the Alfresco Enterprise JMX layer. Also tracks whether Solr is available, sending Spring events when its availability changes.
- Since:
- 4.0
-
Field Summary
Fields inherited from interface org.alfresco.repo.search.impl.solr.SolrAdminClientInterface
JSON_PARAM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()executeAction(String core, JSONAPIResultFactory.ACTION action, Map<String, String> parameters) Execute an ACTION from the SOLR CoreAdmin APIexecuteCommand(String core, JSONAPIResultFactory.HANDLER handler, JSONAPIResultFactory.COMMAND command, Map<String, String> parameters) Execute a COMMAND from the SOLR APIvoidinit()voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) voidsetBaseUrl(String baseUrl) voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) voidsetScheduler(org.quartz.Scheduler scheduler) voidsetShardRegistry(ShardRegistry shardRegistry) voidsetSolrPingCronExpression(String solrPingCronExpression) voidsetStoreMappings(List<SolrStoreMapping> storeMappings) SOLR properties identified by store like "alfresco" or "archive"voidsetUseDynamicShardRegistration(boolean useDynamicShardRegistration) Methods inherited from class org.alfresco.repo.search.impl.solr.AbstractSolrAdminHTTPClient
getOperation
-
Constructor Details
-
SOLRAdminClient
public SOLRAdminClient()
-
-
Method Details
-
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) - Specified by:
setApplicationEventPublisherin interfaceorg.springframework.context.ApplicationEventPublisherAware
-
setSolrPingCronExpression
-
setBaseUrl
-
setScheduler
public void setScheduler(org.quartz.Scheduler scheduler) - Parameters:
scheduler- the scheduler to set
-
setStoreMappings
SOLR properties identified by store like "alfresco" or "archive"- Parameters:
storeMappings-
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
setShardRegistry
-
setUseDynamicShardRegistration
public void setUseDynamicShardRegistration(boolean useDynamicShardRegistration) -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
init
public void init() -
executeAction
public JSONAPIResult executeAction(String core, JSONAPIResultFactory.ACTION action, Map<String, String> parameters) Description copied from interface:SolrAdminClientInterfaceExecute an ACTION from the SOLR CoreAdmin API- Specified by:
executeActionin interfaceSolrAdminClientInterface- Parameters:
core- Name of the core to execute the command, when null the action is executed for all existing coresaction- SOLR CoreAdmin API Action nameparameters- Action parameters in pairs of key, value- Returns:
-
executeCommand
public JSONAPIResult executeCommand(String core, JSONAPIResultFactory.HANDLER handler, JSONAPIResultFactory.COMMAND command, Map<String, String> parameters) Description copied from interface:SolrAdminClientInterfaceExecute a COMMAND from the SOLR API- Specified by:
executeCommandin interfaceSolrAdminClientInterface- Parameters:
core- Name of the core to execute the commandhandler- Name of the handler for the SOLR REST APIcommand- Name of the command to be invokedparameters- Action parameters in pairs of key, value- Returns:
-
getRegisteredCores
-
destroy
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-