Class SolrCoreInit
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.content.indexing.solr.SolrCoreInit
-
- All Implemented Interfaces:
Init
,Configurable
,LogEnabled
,Serviceable
public class SolrCoreInit extends AbstractLogEnabled implements Init, Serviceable, Configurable
Creates one or several Solr cores at initialization.
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>
_coreNames
The name of the cores to create.protected SolrIndexer
_solr
The Solr indexer.
-
Constructor Summary
Constructors Constructor Description SolrCoreInit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration configuration)
protected boolean
createCores(Set<String> coreNames)
Create the cores.void
init()
Method to be implemented by user Init class.void
service(ServiceManager manager)
protected boolean
updateAmetysUrlCoreProperty()
Updates the Ametys URL on Solr server-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_solr
protected SolrIndexer _solr
The Solr indexer.
-
_coreNames
protected Set<String> _coreNames
The name of the cores to create.
-
-
Constructor Detail
-
SolrCoreInit
public SolrCoreInit()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
init
public void init() throws Exception
Description copied from interface:Init
Method to be implemented by user Init class. Here you should manage the business part of your application init. As an Avalon component, class extending this interface have access to all Cocoon-managed components, all plugins, ...
-
createCores
protected boolean createCores(Set<String> coreNames)
Create the cores.- Parameters:
coreNames
- the names of the cores to create.- Returns:
- true if an exception occured. The exception was caught and not re-thrown (just logged)
-
updateAmetysUrlCoreProperty
protected boolean updateAmetysUrlCoreProperty()
Updates the Ametys URL on Solr server- Returns:
- true if an exception occured. The exception was caught and not re-thrown (just logged)
-
-