Interface SolrIndexUpdateCommandHandler
- All Known Subinterfaces:
CatalogSolrIndexCommandHandler
- All Known Implementing Classes:
AbstractSolrIndexUpdateCommandHandlerImpl,CatalogSolrIndexUpdateCommandHandlerImpl
public interface SolrIndexUpdateCommandHandler
Implementations of this interface do the heavy lifting with respect to executing the provided commands. This should only be called from within
the
AbstractSolrIndexUpdateServiceImpl, which provides serialization of the commands.- Author:
- Kelly Tisdell
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.solr.common.SolrInputDocumentbuildDocument(Indexable indexable) Provides an interface for a caller to convert anIndexableinto aSolrInputDocument.org.apache.solr.common.SolrInputDocumentbuildDocument(Indexable indexable, List<IndexField> fields, List<org.broadleafcommerce.common.locale.domain.Locale> locales) Provides an interface for a caller to convert anIndexableinto aSolrInputDocument.<C extends SolrUpdateCommand>
voidexecuteCommand(C command) Entry point from which this component can delegate action based on the type ofSolrUpdateCommand.The background or "offline" collection (index) name or alias.Command group or identifier for which this component can respond.The "live" or customer facing collection (index) name or alias.
-
Method Details
-
executeCommand
<C extends SolrUpdateCommand> void executeCommand(C command) throws org.broadleafcommerce.common.exception.ServiceException Entry point from which this component can delegate action based on the type ofSolrUpdateCommand.This should never be called directly. Rather it will be called from inside the
AbstractSolrIndexUpdateServiceImpl.- Parameters:
command-- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
getCommandGroup
String getCommandGroup()Command group or identifier for which this component can respond. E.g. "catalog". Components that use the same command group operate on the same Solr collections / aliases (indexes).Multiple invocations of this method must return the same result.
- Returns:
-
getForegroundCollectionName
String getForegroundCollectionName()The "live" or customer facing collection (index) name or alias. This should return a non-null, non-empty string. Every invocation should return the same value. (e.g. "catalog").- Returns:
-
getBackgroundCollectionName
String getBackgroundCollectionName()The background or "offline" collection (index) name or alias. This should return a non-null, non-empty string. Every invocation should return the same value. (e.g. "catalogs_reindex").- Returns:
-
buildDocument
Provides an interface for a caller to convert anIndexableinto aSolrInputDocument. This may return null if the implementor does not want the specifiedIndexableindexed.- Parameters:
indexable-- Returns:
-
buildDocument
org.apache.solr.common.SolrInputDocument buildDocument(Indexable indexable, List<IndexField> fields, List<org.broadleafcommerce.common.locale.domain.Locale> locales) Provides an interface for a caller to convert anIndexableinto aSolrInputDocument. This may return null if the implementor does not want the specifiedIndexableindexed.- Parameters:
indexable-fields-locales-- Returns:
-