Class DefaultIndexerBatchStrategy
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.indexer.strategies.impl.DefaultIndexerBatchStrategy
-
- All Implemented Interfaces:
IndexerBatchStrategy
public class DefaultIndexerBatchStrategy extends java.lang.Object implements IndexerBatchStrategy
Default implementation ofIndexerBatchStrategy
-
-
Constructor Summary
Constructors Constructor Description DefaultIndexerBatchStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Executes the strategy.protected voidexecuteIndexerOperation(IndexerBatchContext batchContext)protected java.util.List<ItemModel>executeIndexerQuery(FacetSearchConfig facetSearchConfig, IndexedType indexedType, java.util.List<PK> pks)FacetSearchConfiggetFacetSearchConfig()IndexgetIndex()java.util.Collection<IndexedProperty>getIndexedProperties()IndexedTypegetIndexedType()IndexergetIndexer()IndexerBatchContextFactorygetIndexerBatchContextFactory()java.util.Map<java.lang.String,java.lang.String>getIndexerHints()IndexerQueriesExecutorgetIndexerQueriesExecutor()IndexOperationgetIndexOperation()longgetIndexOperationId()java.util.List<PK>getPks()booleanisExternalIndexOperation()voidsetExternalIndexOperation(boolean externalIndexOperation)Sets the external index operation to be used.voidsetFacetSearchConfig(FacetSearchConfig facetSearchConfig)Sets the facet search config to be used.voidsetIndex(Index index)Sets the index to be usedvoidsetIndexedProperties(java.util.Collection<IndexedProperty> indexedProperties)Sets the indexed properties to be usedvoidsetIndexedType(IndexedType indexedType)Sets the indexed type to be usedvoidsetIndexer(Indexer indexer)voidsetIndexerBatchContextFactory(IndexerBatchContextFactory<?> indexerBatchContextFactory)voidsetIndexerHints(java.util.Map<java.lang.String,java.lang.String> indexerHints)Sets the indexer hints to be usedvoidsetIndexerQueriesExecutor(IndexerQueriesExecutor indexerQueriesExecutor)voidsetIndexOperation(IndexOperation indexOperation)Sets the index operation to be usedvoidsetIndexOperationId(long indexOperationId)Sets the indexed operation id to be usedvoidsetPks(java.util.List<PK> pks)Sets the pks to be usedprotected voidvalidateRequiredFields()
-
-
-
Method Detail
-
getIndexer
public Indexer getIndexer()
-
setIndexer
public void setIndexer(Indexer indexer)
-
getIndexerBatchContextFactory
public IndexerBatchContextFactory getIndexerBatchContextFactory()
-
setIndexerBatchContextFactory
public void setIndexerBatchContextFactory(IndexerBatchContextFactory<?> indexerBatchContextFactory)
-
getIndexerQueriesExecutor
public IndexerQueriesExecutor getIndexerQueriesExecutor()
-
setIndexerQueriesExecutor
public void setIndexerQueriesExecutor(IndexerQueriesExecutor indexerQueriesExecutor)
-
isExternalIndexOperation
public boolean isExternalIndexOperation()
-
setExternalIndexOperation
public void setExternalIndexOperation(boolean externalIndexOperation)
Description copied from interface:IndexerBatchStrategySets the external index operation to be used.- Specified by:
setExternalIndexOperationin interfaceIndexerBatchStrategy- Parameters:
externalIndexOperation- - the external index operation
-
getFacetSearchConfig
public FacetSearchConfig getFacetSearchConfig()
-
setFacetSearchConfig
public void setFacetSearchConfig(FacetSearchConfig facetSearchConfig)
Description copied from interface:IndexerBatchStrategySets the facet search config to be used.- Specified by:
setFacetSearchConfigin interfaceIndexerBatchStrategy- Parameters:
facetSearchConfig- - the facet search config to be used
-
getIndex
public Index getIndex()
-
setIndex
public void setIndex(Index index)
Description copied from interface:IndexerBatchStrategySets the index to be used- Specified by:
setIndexin interfaceIndexerBatchStrategy- Parameters:
index- - the index to be used
-
getIndexedProperties
public java.util.Collection<IndexedProperty> getIndexedProperties()
-
setIndexedProperties
public void setIndexedProperties(java.util.Collection<IndexedProperty> indexedProperties)
Description copied from interface:IndexerBatchStrategySets the indexed properties to be used- Specified by:
setIndexedPropertiesin interfaceIndexerBatchStrategy- Parameters:
indexedProperties- - the indexed properties to be used
-
getIndexedType
public IndexedType getIndexedType()
-
setIndexedType
public void setIndexedType(IndexedType indexedType)
Description copied from interface:IndexerBatchStrategySets the indexed type to be used- Specified by:
setIndexedTypein interfaceIndexerBatchStrategy- Parameters:
indexedType- - the indexed type to be used
-
getIndexerHints
public java.util.Map<java.lang.String,java.lang.String> getIndexerHints()
-
setIndexerHints
public void setIndexerHints(java.util.Map<java.lang.String,java.lang.String> indexerHints)
Description copied from interface:IndexerBatchStrategySets the indexer hints to be used- Specified by:
setIndexerHintsin interfaceIndexerBatchStrategy- Parameters:
indexerHints- - the indexer hints to be used
-
getIndexOperation
public IndexOperation getIndexOperation()
-
setIndexOperation
public void setIndexOperation(IndexOperation indexOperation)
Description copied from interface:IndexerBatchStrategySets the index operation to be used- Specified by:
setIndexOperationin interfaceIndexerBatchStrategy- Parameters:
indexOperation- - the index operation to be used
-
getIndexOperationId
public long getIndexOperationId()
-
setIndexOperationId
public void setIndexOperationId(long indexOperationId)
Description copied from interface:IndexerBatchStrategySets the indexed operation id to be used- Specified by:
setIndexOperationIdin interfaceIndexerBatchStrategy- Parameters:
indexOperationId- - the indexed operation id to be used
-
getPks
public java.util.List<PK> getPks()
-
setPks
public void setPks(java.util.List<PK> pks)
Description copied from interface:IndexerBatchStrategySets the pks to be used- Specified by:
setPksin interfaceIndexerBatchStrategy- Parameters:
pks- - the pks to be used
-
execute
public void execute() throws java.lang.InterruptedException, IndexerExceptionDescription copied from interface:IndexerBatchStrategyExecutes the strategy.- Specified by:
executein interfaceIndexerBatchStrategy- Throws:
java.lang.InterruptedException- throw if a thread is interruptedIndexerException- if an error occurs during the strategy execution
-
validateRequiredFields
protected void validateRequiredFields()
-
executeIndexerQuery
protected java.util.List<ItemModel> executeIndexerQuery(FacetSearchConfig facetSearchConfig, IndexedType indexedType, java.util.List<PK> pks) throws IndexerException
- Throws:
IndexerException
-
executeIndexerOperation
protected void executeIndexerOperation(IndexerBatchContext batchContext) throws IndexerException, java.lang.InterruptedException
- Throws:
IndexerExceptionjava.lang.InterruptedException
-
-