Class DefaultSnIndexerBatchStrategy
- java.lang.Object
-
- de.hybris.platform.searchservices.indexer.service.impl.DefaultSnIndexerBatchStrategy
-
- All Implemented Interfaces:
SnIndexerBatchStrategy,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class DefaultSnIndexerBatchStrategy extends java.lang.Object implements SnIndexerBatchStrategy, org.springframework.context.ApplicationContextAware
Default implementation forSnIndexerBatchStrategy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDefaultSnIndexerBatchStrategy.ValueProviderWrapper
-
Constructor Summary
Constructors Constructor Description DefaultSnIndexerBatchStrategy()
-
Method Summary
-
-
-
Method Detail
-
execute
public SnIndexerBatchResponse execute(SnIndexerBatchRequest indexerBatchRequest) throws SnIndexerException, java.lang.InterruptedException
Description copied from interface:SnIndexerBatchStrategyExecutes the indexer request.- Specified by:
executein interfaceSnIndexerBatchStrategy- Returns:
- the indexer batch response
- Throws:
SnIndexerException- if an error occursjava.lang.InterruptedException
-
executeBeforeIndexBatchListeners
protected void executeBeforeIndexBatchListeners(SnIndexerContext indexerContext, java.util.List<SnIndexerBatchListener> listeners) throws SnException
- Throws:
SnException
-
executeAfterIndexBatchListeners
protected void executeAfterIndexBatchListeners(SnIndexerContext indexerContext, java.util.List<SnIndexerBatchListener> listeners) throws SnException
- Throws:
SnException
-
executeAfterIndexBatchErrorListeners
protected void executeAfterIndexBatchErrorListeners(SnIndexerContext indexerContext, java.util.List<SnIndexerBatchListener> listeners)
-
doExecute
protected SnIndexerBatchResponse doExecute(SnIndexerContext indexerContext, java.lang.String indexerBatchId) throws SnException, java.lang.InterruptedException
- Throws:
SnExceptionjava.lang.InterruptedException
-
addIndexDocumentBatchOperationRequests
protected void addIndexDocumentBatchOperationRequests(SnIndexerContext indexerContext, java.util.List<SnDocumentBatchOperationRequest> documentBatchOperationRequests, java.util.List<PK> pks, SnIdentityProvider identityProvider, SnDocumentOperationType operationType) throws SnException, java.lang.InterruptedException
- Throws:
SnExceptionjava.lang.InterruptedException
-
addDeleteDocumentBatchOperationRequests
protected void addDeleteDocumentBatchOperationRequests(SnIndexerContext indexerContext, java.util.List<SnDocumentBatchOperationRequest> documentBatchOperationRequests, java.util.List<PK> pks, SnIdentityProvider identityProvider) throws SnException, java.lang.InterruptedException
- Throws:
SnExceptionjava.lang.InterruptedException
-
createIdentityProvider
protected SnIdentityProvider createIdentityProvider(SnIndexerContext indexerContext) throws SnIndexerException
- Throws:
SnIndexerException
-
collectItems
protected java.util.List<ItemModel> collectItems(SnIndexerContext indexerContext, java.util.List<PK> pks)
-
createValueProviders
protected java.util.Collection<DefaultSnIndexerBatchStrategy.ValueProviderWrapper> createValueProviders(SnIndexerContext indexerContext) throws SnIndexerException
- Throws:
SnIndexerException
-
collectAvailableQualifiers
protected java.util.Map<java.lang.String,java.util.List<SnQualifier>> collectAvailableQualifiers(SnIndexerContext indexerContext, SnIndexType indexType)
-
createValueProvider
protected SnIndexerValueProvider createValueProvider(java.lang.String valueProviderId) throws SnIndexerException
- Throws:
SnIndexerException
-
createIndexerBatchResponse
protected SnIndexerBatchResponse createIndexerBatchResponse(SnIndexerContext indexerContext, java.lang.Integer totalItems, java.lang.Integer processedItems)
-
getFlexibleSearchService
public FlexibleSearchService getFlexibleSearchService()
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
getSnSessionService
public SnSessionService getSnSessionService()
-
setSnSessionService
public void setSnSessionService(SnSessionService snSessionService)
-
getSnIndexerContextFactory
public SnIndexerContextFactory getSnIndexerContextFactory()
-
setSnIndexerContextFactory
public void setSnIndexerContextFactory(SnIndexerContextFactory snIndexerContextFactory)
-
getSnIndexService
public SnIndexService getSnIndexService()
-
setSnIndexService
public void setSnIndexService(SnIndexService snIndexService)
-
getSnListenerFactory
public SnListenerFactory getSnListenerFactory()
-
setSnListenerFactory
public void setSnListenerFactory(SnListenerFactory snListenerFactory)
-
getSnSearchProviderFactory
public SnSearchProviderFactory getSnSearchProviderFactory()
-
setSnSearchProviderFactory
public void setSnSearchProviderFactory(SnSearchProviderFactory snSearchProviderFactory)
-
getSnQualifierTypeFactory
public SnQualifierTypeFactory getSnQualifierTypeFactory()
-
setSnQualifierTypeFactory
public void setSnQualifierTypeFactory(SnQualifierTypeFactory snQualifierTypeFactory)
-
getApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext()
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
-