Class DefaultReindexDelegationService
- java.lang.Object
-
- com.broadleafcommerce.search.index.core.service.DefaultReindexDelegationService
-
- All Implemented Interfaces:
ReindexDelegationService
public class DefaultReindexDelegationService extends Object implements ReindexDelegationService
-
-
Constructor Summary
Constructors Constructor Description DefaultReindexDelegationService(List<SearchIndexMasterProcessLauncher> processLaunchers, List<SearchIndexWorkerProcessLauncher> processWorkers, ReindexService reindexService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<com.broadleafcommerce.search.api.type.IndexableType,SearchIndexMasterProcessLauncher>
getProcessLauncherMap()
protected ReindexService
getReindexService()
void
performFullReindex(com.broadleafcommerce.search.api.type.IndexableType type)
Performs a full reindex on a specific type.void
performFullReindex(com.broadleafcommerce.search.api.type.IndexableType type, Map<String,Serializable> properties)
Performs a full reindex on a specific type.void
reindex(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
Indexes a single Indexable immediately to the primary collection.void
reindex(List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>> indexables)
Indexes multiple Indexables immediately to the primary collection.protected void
startFullReindex(com.broadleafcommerce.search.api.type.IndexableType type, Map<String,Serializable> properties)
-
-
-
Constructor Detail
-
DefaultReindexDelegationService
public DefaultReindexDelegationService(List<SearchIndexMasterProcessLauncher> processLaunchers, List<SearchIndexWorkerProcessLauncher> processWorkers, ReindexService reindexService)
-
-
Method Detail
-
performFullReindex
public void performFullReindex(com.broadleafcommerce.search.api.type.IndexableType type) throws com.broadleafcommerce.search.api.SearchIndexException
Description copied from interface:ReindexDelegationService
Performs a full reindex on a specific type.- Specified by:
performFullReindex
in interfaceReindexDelegationService
- Parameters:
type
- The type to reindex- Throws:
com.broadleafcommerce.search.api.SearchIndexException
- If an error occurs during the reindex process
-
performFullReindex
public void performFullReindex(com.broadleafcommerce.search.api.type.IndexableType type, Map<String,Serializable> properties) throws com.broadleafcommerce.search.api.SearchIndexException
Description copied from interface:ReindexDelegationService
Performs a full reindex on a specific type.Allows additional properties to be passed and used in the reindex process. These properties are accessible via
ProcessStateHolder.getAdditionalProperties()
- Specified by:
performFullReindex
in interfaceReindexDelegationService
- Parameters:
type
- The indexable typeproperties
- Properties available during the reindex process- Throws:
com.broadleafcommerce.search.api.SearchIndexException
- If an error occurs during the reindex process- See Also:
ProcessStateHolder
-
startFullReindex
protected void startFullReindex(com.broadleafcommerce.search.api.type.IndexableType type, @Nullable Map<String,Serializable> properties) throws com.broadleafcommerce.search.api.SearchIndexException
- Throws:
com.broadleafcommerce.search.api.SearchIndexException
-
reindex
public void reindex(List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>> indexables) throws com.broadleafcommerce.search.api.SearchIndexException
Description copied from interface:ReindexDelegationService
Indexes multiple Indexables immediately to the primary collection.- Specified by:
reindex
in interfaceReindexDelegationService
- Parameters:
indexables
- The indexables to index.- Throws:
com.broadleafcommerce.search.api.SearchIndexException
- If an error occurs during the reindex process
-
reindex
public void reindex(com.broadleafcommerce.search.api.domain.Indexable<?> indexable) throws com.broadleafcommerce.search.api.SearchIndexException
Description copied from interface:ReindexDelegationService
Indexes a single Indexable immediately to the primary collection.- Specified by:
reindex
in interfaceReindexDelegationService
- Parameters:
indexable
- The indexable to index.- Throws:
com.broadleafcommerce.search.api.SearchIndexException
- If an error occurs during the reindex process
-
getProcessLauncherMap
protected Map<com.broadleafcommerce.search.api.type.IndexableType,SearchIndexMasterProcessLauncher> getProcessLauncherMap()
-
getReindexService
protected ReindexService getReindexService()
-
-