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 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 of SolrUpdateCommand.

      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

      org.apache.solr.common.SolrInputDocument buildDocument(Indexable indexable)
      Provides an interface for a caller to convert an Indexable into a SolrInputDocument. This may return null if the implementor does not want the specified Indexable indexed.
      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 an Indexable into a SolrInputDocument. This may return null if the implementor does not want the specified Indexable indexed.
      Parameters:
      indexable -
      fields -
      locales -
      Returns: