Class DefaultSnIndexerStrategy
- java.lang.Object
-
- de.hybris.platform.searchservices.indexer.service.impl.AbstractSnIndexerStrategy
-
- de.hybris.platform.searchservices.indexer.service.impl.DefaultSnIndexerStrategy
-
- All Implemented Interfaces:
SnIndexerStrategy,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
BackofficeSnIndexerStrategy
public class DefaultSnIndexerStrategy extends AbstractSnIndexerStrategy implements org.springframework.context.ApplicationContextAware
Default implementation forSnIndexerStrategy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDefaultSnIndexerStrategy.IndexerBatchFutureprotected static classDefaultSnIndexerStrategy.IndexerBatchThreadFactoryprotected static classDefaultSnIndexerStrategy.IndexerBatchThreadPoolExecutorprotected static classDefaultSnIndexerStrategy.IndexerBatchTrackerprotected static classDefaultSnIndexerStrategy.IndexerTracker-
Nested classes/interfaces inherited from class de.hybris.platform.searchservices.indexer.service.impl.AbstractSnIndexerStrategy
AbstractSnIndexerStrategy.IndexerBatch, AbstractSnIndexerStrategy.IndexerBatchGroup
-
-
Field Summary
Fields Modifier and Type Field Description protected static intDEFAULT_INDEXER_THREAD_POOL_SIZEprotected static intDEFAULT_MAX_INDEXER_BATCH_RETRIESprotected static intDEFAULT_MAX_INDEXER_RETRIES-
Fields inherited from class de.hybris.platform.searchservices.indexer.service.impl.AbstractSnIndexerStrategy
DEFAULT_MAX_INDEXER_BATCH_SIZE
-
-
Constructor Summary
Constructors Constructor Description DefaultSnIndexerStrategy()
-
Method Summary
-
Methods inherited from class de.hybris.platform.searchservices.indexer.service.impl.AbstractSnIndexerStrategy
buildIndexerBatchGroup, buildIndexerBatchGroup, buildIndexerBatchGroups, buildIndexerBatchId, createIndexerResponse, execute, executeAfterIndexErrorListeners, executeAfterIndexListeners, executeBeforeIndexListeners, extractErrorMessage, getSnCommonConfigurationService, getSnIndexerContextFactory, getSnIndexService, getSnListenerFactory, getSnSearchProviderFactory, getSnSessionService, joinAndDedupIndexerItemSourceOperations, setSnCommonConfigurationService, setSnIndexerContextFactory, setSnIndexService, setSnListenerFactory, setSnSearchProviderFactory, setSnSessionService, updateIndexerOperationStatusQuietly, updateIndexerProgress
-
-
-
-
Field Detail
-
DEFAULT_INDEXER_THREAD_POOL_SIZE
protected static final int DEFAULT_INDEXER_THREAD_POOL_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_MAX_INDEXER_BATCH_RETRIES
protected static final int DEFAULT_MAX_INDEXER_BATCH_RETRIES
- See Also:
- Constant Field Values
-
DEFAULT_MAX_INDEXER_RETRIES
protected static final int DEFAULT_MAX_INDEXER_RETRIES
- See Also:
- Constant Field Values
-
-
Method Detail
-
doExecute
protected SnIndexerResponse doExecute(SnIndexerContext indexerContext, java.util.List<AbstractSnIndexerStrategy.IndexerBatchGroup> indexerBatchGroups) throws SnIndexerException
- Specified by:
doExecutein classAbstractSnIndexerStrategy- Throws:
SnIndexerException
-
executeIndexerBatchGroups
protected SnIndexerOperationStatus executeIndexerBatchGroups(SnIndexerContext indexerContext, DefaultSnIndexerStrategy.IndexerTracker indexerTracker, DefaultSnIndexerStrategy.IndexerBatchThreadPoolExecutor executorService, java.util.List<AbstractSnIndexerStrategy.IndexerBatchGroup> indexerBatchGroups, int maxBatchRetries) throws SnIndexerException, java.lang.InterruptedException
- Throws:
SnIndexerExceptionjava.lang.InterruptedException
-
executeIndexerBatchGroup
protected SnIndexerOperationStatus executeIndexerBatchGroup(SnIndexerContext indexerContext, DefaultSnIndexerStrategy.IndexerBatchThreadPoolExecutor executorService, DefaultSnIndexerStrategy.IndexerTracker indexerTracker, AbstractSnIndexerStrategy.IndexerBatchGroup indexerBatchGroup, int maxBatchRetries) throws SnIndexerException, java.lang.InterruptedException
- Throws:
SnIndexerExceptionjava.lang.InterruptedException
-
createIndexerBatchTrackers
protected java.util.Map<java.lang.String,DefaultSnIndexerStrategy.IndexerBatchTracker> createIndexerBatchTrackers(SnIndexerContext indexerContext, AbstractSnIndexerStrategy.IndexerBatchGroup indexerBatchGroup, int maxBatchRetries) throws SnIndexerException
- Throws:
SnIndexerException
-
createIndexerBatchCallable
protected SnIndexerBatchCallable createIndexerBatchCallable(SnIndexerContext indexerContext, java.util.List<SnIndexerItemSourceOperation> indexerItemSourceOperations, java.lang.String indexerBatchId) throws SnIndexerException
- Throws:
SnIndexerException
-
retrieveIndexerBatchResponse
protected SnIndexerBatchResponse retrieveIndexerBatchResponse(SnIndexerContext indexerContext, DefaultSnIndexerStrategy.IndexerBatchTracker indexerBatchTracker, DefaultSnIndexerStrategy.IndexerBatchFuture indexerBatchFuture) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
submitIndexerBatch
protected void submitIndexerBatch(java.util.concurrent.CompletionService<SnIndexerBatchResponse> completionService, DefaultSnIndexerStrategy.IndexerBatchTracker indexerBatchTracker)
-
canSubmitIndexerBatchAfterError
protected boolean canSubmitIndexerBatchAfterError(DefaultSnIndexerStrategy.IndexerTracker indexerTracker, DefaultSnIndexerStrategy.IndexerBatchTracker indexerBatchTracker)
-
getIndexerBatchCallableId
public java.lang.String getIndexerBatchCallableId()
-
setIndexerBatchCallableId
public void setIndexerBatchCallableId(java.lang.String indexerBatchCallableId)
-
getApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext()
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
-