Class AbstractSnIndexerStrategy
java.lang.Object
de.hybris.platform.searchservices.indexer.service.impl.AbstractSnIndexerStrategy
- All Implemented Interfaces:
SnIndexerStrategy
- Direct Known Subclasses:
DefaultSnIndexerStrategy
Base class for
SnIndexerStrategy implementations.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildIndexerBatchGroup(SnDocumentOperationType documentOperationType, List<PK> indexerItemSourcePks, int batchIndex, int maxBatchSize) buildIndexerBatchGroup(List<SnIndexerItemSourceOperation> batchIndexerItemSourceOperations, int batchIndex, int batchSize) protected List<AbstractSnIndexerStrategy.IndexerBatchGroup>buildIndexerBatchGroups(SnIndexerContext indexerContext) protected StringbuildIndexerBatchId(int batchIndex) protected SnIndexerResponsecreateIndexerResponse(SnIndexerContext indexerContext, Integer totalItems, Integer processedItems, SnIndexerOperationStatus status) protected abstract SnIndexerResponsedoExecute(SnIndexerContext indexerContext, List<AbstractSnIndexerStrategy.IndexerBatchGroup> indexerBatchGroups) execute(SnIndexerRequest indexerRequest) Executes the indexer batch request.protected voidexecuteAfterIndexErrorListeners(SnIndexerContext indexerContext, List<SnIndexerListener> listeners) protected voidexecuteAfterIndexListeners(SnIndexerContext indexerContext, List<SnIndexerListener> listeners) protected voidexecuteBeforeIndexListeners(SnIndexerContext indexerContext, List<SnIndexerListener> listeners) protected StringextractErrorMessage(Exception exception) protected voidfailIndexerOperationQuietly(SnIndexerContext indexerContext, Exception exception) protected List<SnIndexerItemSourceOperation>joinAndDedupIndexerItemSourceOperations(SnIndexerContext indexerContext) voidsetSnCommonConfigurationService(SnCommonConfigurationService snCommonConfigurationService) voidsetSnIndexerContextFactory(SnIndexerContextFactory snIndexerContextFactory) voidsetSnIndexService(SnIndexService snIndexService) voidsetSnListenerFactory(SnListenerFactory snListenerFactory) voidsetSnSearchProviderFactory(SnSearchProviderFactory snSearchProviderFactory) voidsetSnSessionService(SnSessionService snSessionService) protected voidupdateIndexerProgress(SnIndexerRequest indexerRequest, Double value)
-
Field Details
-
DEFAULT_MAX_INDEXER_BATCH_SIZE
protected static final int DEFAULT_MAX_INDEXER_BATCH_SIZE- See Also:
-
-
Constructor Details
-
AbstractSnIndexerStrategy
public AbstractSnIndexerStrategy()
-
-
Method Details
-
execute
Description copied from interface:SnIndexerStrategyExecutes the indexer batch request.- Specified by:
executein interfaceSnIndexerStrategy- Parameters:
indexerRequest- - the indexer request- Returns:
- the indexer response
- Throws:
SnIndexerException- if an error occurs
-
updateIndexerProgress
-
failIndexerOperationQuietly
-
extractErrorMessage
-
executeBeforeIndexListeners
protected void executeBeforeIndexListeners(SnIndexerContext indexerContext, List<SnIndexerListener> listeners) throws SnException - Throws:
SnException
-
executeAfterIndexListeners
protected void executeAfterIndexListeners(SnIndexerContext indexerContext, List<SnIndexerListener> listeners) throws SnException - Throws:
SnException
-
executeAfterIndexErrorListeners
protected void executeAfterIndexErrorListeners(SnIndexerContext indexerContext, List<SnIndexerListener> listeners) -
buildIndexerBatchGroups
protected List<AbstractSnIndexerStrategy.IndexerBatchGroup> buildIndexerBatchGroups(SnIndexerContext indexerContext) throws SnIndexerException - Throws:
SnIndexerException
-
joinAndDedupIndexerItemSourceOperations
protected List<SnIndexerItemSourceOperation> joinAndDedupIndexerItemSourceOperations(SnIndexerContext indexerContext) throws SnIndexerException - Throws:
SnIndexerException
-
buildIndexerBatchGroup
protected AbstractSnIndexerStrategy.IndexerBatchGroup buildIndexerBatchGroup(List<SnIndexerItemSourceOperation> batchIndexerItemSourceOperations, int batchIndex, int batchSize) -
buildIndexerBatchGroup
protected AbstractSnIndexerStrategy.IndexerBatchGroup buildIndexerBatchGroup(SnDocumentOperationType documentOperationType, List<PK> indexerItemSourcePks, int batchIndex, int maxBatchSize) -
buildIndexerBatchId
-
doExecute
protected abstract SnIndexerResponse doExecute(SnIndexerContext indexerContext, List<AbstractSnIndexerStrategy.IndexerBatchGroup> indexerBatchGroups) throws SnIndexerException - Throws:
SnIndexerException
-
createIndexerResponse
protected SnIndexerResponse createIndexerResponse(SnIndexerContext indexerContext, Integer totalItems, Integer processedItems, SnIndexerOperationStatus status) -
getSnCommonConfigurationService
-
setSnCommonConfigurationService
public void setSnCommonConfigurationService(SnCommonConfigurationService snCommonConfigurationService) -
getSnSessionService
-
setSnSessionService
-
getSnIndexerContextFactory
-
setSnIndexerContextFactory
-
getSnListenerFactory
-
setSnListenerFactory
-
getSnIndexService
-
setSnIndexService
-
getSnSearchProviderFactory
-
setSnSearchProviderFactory
-