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
public class DefaultSnIndexerStrategy
extends AbstractSnIndexerStrategy
implements org.springframework.context.ApplicationContextAware
Default implementation for
SnIndexerStrategy.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classprotected static classprotected static classprotected static classNested classes/interfaces inherited from class de.hybris.platform.searchservices.indexer.service.impl.AbstractSnIndexerStrategy
AbstractSnIndexerStrategy.IndexerBatch, AbstractSnIndexerStrategy.IndexerBatchGroup -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intFields inherited from class de.hybris.platform.searchservices.indexer.service.impl.AbstractSnIndexerStrategy
DEFAULT_MAX_INDEXER_BATCH_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanSubmitIndexerBatchAfterError(DefaultSnIndexerStrategy.IndexerTracker indexerTracker, DefaultSnIndexerStrategy.IndexerBatchTracker indexerBatchTracker) protected SnIndexerBatchCallablecreateIndexerBatchCallable(SnIndexerContext indexerContext, List<SnIndexerItemSourceOperation> indexerItemSourceOperations, String indexerBatchId) createIndexerBatchTrackers(SnIndexerContext indexerContext, AbstractSnIndexerStrategy.IndexerBatchGroup indexerBatchGroup, int maxBatchRetries) protected SnIndexerResponsedoExecute(SnIndexerContext indexerContext, List<AbstractSnIndexerStrategy.IndexerBatchGroup> indexerBatchGroups) protected SnIndexerOperationStatusexecuteIndexerBatchGroup(SnIndexerContext indexerContext, DefaultSnIndexerStrategy.IndexerBatchThreadPoolExecutor executorService, DefaultSnIndexerStrategy.IndexerTracker indexerTracker, AbstractSnIndexerStrategy.IndexerBatchGroup indexerBatchGroup, int maxBatchRetries) protected SnIndexerOperationStatusexecuteIndexerBatchGroups(SnIndexerContext indexerContext, DefaultSnIndexerStrategy.IndexerTracker indexerTracker, DefaultSnIndexerStrategy.IndexerBatchThreadPoolExecutor executorService, List<AbstractSnIndexerStrategy.IndexerBatchGroup> indexerBatchGroups, int maxBatchRetries) protected org.springframework.context.ApplicationContextprotected SnIndexerBatchResponseretrieveIndexerBatchResponse(SnIndexerContext indexerContext, DefaultSnIndexerStrategy.IndexerBatchTracker indexerBatchTracker, DefaultSnIndexerStrategy.IndexerBatchFuture indexerBatchFuture) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetIndexerBatchCallableId(String indexerBatchCallableId) protected voidsubmitIndexerBatch(CompletionService<SnIndexerBatchResponse> completionService, DefaultSnIndexerStrategy.IndexerBatchTracker indexerBatchTracker) Methods inherited from class de.hybris.platform.searchservices.indexer.service.impl.AbstractSnIndexerStrategy
buildIndexerBatchGroup, buildIndexerBatchGroup, buildIndexerBatchGroups, buildIndexerBatchId, createIndexerResponse, execute, executeAfterIndexErrorListeners, executeAfterIndexListeners, executeBeforeIndexListeners, extractErrorMessage, failIndexerOperationQuietly, getSnCommonConfigurationService, getSnIndexerContextFactory, getSnIndexService, getSnListenerFactory, getSnSearchProviderFactory, getSnSessionService, joinAndDedupIndexerItemSourceOperations, setSnCommonConfigurationService, setSnIndexerContextFactory, setSnIndexService, setSnListenerFactory, setSnSearchProviderFactory, setSnSessionService, updateIndexerProgress
-
Field Details
-
DEFAULT_INDEXER_THREAD_POOL_SIZE
protected static final int DEFAULT_INDEXER_THREAD_POOL_SIZE- See Also:
-
DEFAULT_MAX_INDEXER_BATCH_RETRIES
protected static final int DEFAULT_MAX_INDEXER_BATCH_RETRIES- See Also:
-
DEFAULT_MAX_INDEXER_RETRIES
protected static final int DEFAULT_MAX_INDEXER_RETRIES- See Also:
-
-
Constructor Details
-
DefaultSnIndexerStrategy
public DefaultSnIndexerStrategy()
-
-
Method Details
-
doExecute
protected SnIndexerResponse doExecute(SnIndexerContext indexerContext, List<AbstractSnIndexerStrategy.IndexerBatchGroup> indexerBatchGroups) throws SnIndexerException - Specified by:
doExecutein classAbstractSnIndexerStrategy- Throws:
SnIndexerException
-
executeIndexerBatchGroups
protected SnIndexerOperationStatus executeIndexerBatchGroups(SnIndexerContext indexerContext, DefaultSnIndexerStrategy.IndexerTracker indexerTracker, DefaultSnIndexerStrategy.IndexerBatchThreadPoolExecutor executorService, List<AbstractSnIndexerStrategy.IndexerBatchGroup> indexerBatchGroups, int maxBatchRetries) throws SnIndexerException, InterruptedException -
executeIndexerBatchGroup
protected SnIndexerOperationStatus executeIndexerBatchGroup(SnIndexerContext indexerContext, DefaultSnIndexerStrategy.IndexerBatchThreadPoolExecutor executorService, DefaultSnIndexerStrategy.IndexerTracker indexerTracker, AbstractSnIndexerStrategy.IndexerBatchGroup indexerBatchGroup, int maxBatchRetries) throws SnIndexerException, InterruptedException -
createIndexerBatchTrackers
protected Map<String,DefaultSnIndexerStrategy.IndexerBatchTracker> createIndexerBatchTrackers(SnIndexerContext indexerContext, AbstractSnIndexerStrategy.IndexerBatchGroup indexerBatchGroup, int maxBatchRetries) throws SnIndexerException - Throws:
SnIndexerException
-
createIndexerBatchCallable
protected SnIndexerBatchCallable createIndexerBatchCallable(SnIndexerContext indexerContext, List<SnIndexerItemSourceOperation> indexerItemSourceOperations, String indexerBatchId) throws SnIndexerException - Throws:
SnIndexerException
-
retrieveIndexerBatchResponse
protected SnIndexerBatchResponse retrieveIndexerBatchResponse(SnIndexerContext indexerContext, DefaultSnIndexerStrategy.IndexerBatchTracker indexerBatchTracker, DefaultSnIndexerStrategy.IndexerBatchFuture indexerBatchFuture) throws InterruptedException - Throws:
InterruptedException
-
submitIndexerBatch
protected void submitIndexerBatch(CompletionService<SnIndexerBatchResponse> completionService, DefaultSnIndexerStrategy.IndexerBatchTracker indexerBatchTracker) -
canSubmitIndexerBatchAfterError
protected boolean canSubmitIndexerBatchAfterError(DefaultSnIndexerStrategy.IndexerTracker indexerTracker, DefaultSnIndexerStrategy.IndexerBatchTracker indexerBatchTracker) -
getIndexerBatchCallableId
-
setIndexerBatchCallableId
-
getApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext() -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-