Class AbstractSnIndexerStrategy
- java.lang.Object
-
- de.hybris.platform.searchservices.indexer.service.impl.AbstractSnIndexerStrategy
-
- All Implemented Interfaces:
SnIndexerStrategy
- Direct Known Subclasses:
DefaultSnIndexerStrategy
public abstract class AbstractSnIndexerStrategy extends java.lang.Object implements SnIndexerStrategy
Base class forSnIndexerStrategyimplementations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractSnIndexerStrategy.IndexerBatchprotected static classAbstractSnIndexerStrategy.IndexerBatchGroup
-
Field Summary
Fields Modifier and Type Field Description protected static intDEFAULT_MAX_INDEXER_BATCH_SIZE
-
Constructor Summary
Constructors Constructor Description AbstractSnIndexerStrategy()
-
Method Summary
-
-
-
Field Detail
-
DEFAULT_MAX_INDEXER_BATCH_SIZE
protected static final int DEFAULT_MAX_INDEXER_BATCH_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
execute
public SnIndexerResponse execute(SnIndexerRequest indexerRequest) throws SnIndexerException
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
protected void updateIndexerProgress(SnIndexerRequest indexerRequest, java.lang.Double value)
-
updateIndexerOperationStatusQuietly
protected void updateIndexerOperationStatusQuietly(SnIndexerContext indexerContext, SnIndexerOperationStatus status, java.lang.Exception exception)
-
extractErrorMessage
protected java.lang.String extractErrorMessage(java.lang.Exception exception)
-
executeBeforeIndexListeners
protected void executeBeforeIndexListeners(SnIndexerContext indexerContext, java.util.List<SnIndexerListener> listeners) throws SnException
- Throws:
SnException
-
executeAfterIndexListeners
protected void executeAfterIndexListeners(SnIndexerContext indexerContext, java.util.List<SnIndexerListener> listeners) throws SnException
- Throws:
SnException
-
executeAfterIndexErrorListeners
protected void executeAfterIndexErrorListeners(SnIndexerContext indexerContext, java.util.List<SnIndexerListener> listeners)
-
buildIndexerBatchGroups
protected java.util.List<AbstractSnIndexerStrategy.IndexerBatchGroup> buildIndexerBatchGroups(SnIndexerContext indexerContext) throws SnIndexerException
- Throws:
SnIndexerException
-
joinAndDedupIndexerItemSourceOperations
protected java.util.List<SnIndexerItemSourceOperation> joinAndDedupIndexerItemSourceOperations(SnIndexerContext indexerContext) throws SnIndexerException
- Throws:
SnIndexerException
-
buildIndexerBatchGroup
protected AbstractSnIndexerStrategy.IndexerBatchGroup buildIndexerBatchGroup(java.util.List<SnIndexerItemSourceOperation> batchIndexerItemSourceOperations, int batchIndex, int batchSize)
-
buildIndexerBatchGroup
protected AbstractSnIndexerStrategy.IndexerBatchGroup buildIndexerBatchGroup(SnDocumentOperationType documentOperationType, java.util.List<PK> indexerItemSourcePks, int batchIndex, int maxBatchSize)
-
buildIndexerBatchId
protected java.lang.String buildIndexerBatchId(int batchIndex)
-
doExecute
protected abstract SnIndexerResponse doExecute(SnIndexerContext indexerContext, java.util.List<AbstractSnIndexerStrategy.IndexerBatchGroup> indexerBatchGroups) throws SnIndexerException
- Throws:
SnIndexerException
-
createIndexerResponse
protected SnIndexerResponse createIndexerResponse(SnIndexerContext indexerContext, java.lang.Integer totalItems, java.lang.Integer processedItems, SnIndexerOperationStatus status)
-
getSnCommonConfigurationService
public SnCommonConfigurationService getSnCommonConfigurationService()
-
setSnCommonConfigurationService
public void setSnCommonConfigurationService(SnCommonConfigurationService snCommonConfigurationService)
-
getSnSessionService
public SnSessionService getSnSessionService()
-
setSnSessionService
public void setSnSessionService(SnSessionService snSessionService)
-
getSnIndexerContextFactory
public SnIndexerContextFactory getSnIndexerContextFactory()
-
setSnIndexerContextFactory
public void setSnIndexerContextFactory(SnIndexerContextFactory snIndexerContextFactory)
-
getSnListenerFactory
public SnListenerFactory getSnListenerFactory()
-
setSnListenerFactory
public void setSnListenerFactory(SnListenerFactory snListenerFactory)
-
getSnIndexService
public SnIndexService getSnIndexService()
-
setSnIndexService
public void setSnIndexService(SnIndexService snIndexService)
-
getSnSearchProviderFactory
public SnSearchProviderFactory getSnSearchProviderFactory()
-
setSnSearchProviderFactory
public void setSnSearchProviderFactory(SnSearchProviderFactory snSearchProviderFactory)
-
-