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 void
execute()
Executes the strategy.protected void
executeIndexerOperation(IndexerBatchContext batchContext)
protected java.util.List<ItemModel>
executeIndexerQuery(FacetSearchConfig facetSearchConfig, IndexedType indexedType, java.util.List<PK> pks)
FacetSearchConfig
getFacetSearchConfig()
Index
getIndex()
java.util.Collection<IndexedProperty>
getIndexedProperties()
IndexedType
getIndexedType()
Indexer
getIndexer()
IndexerBatchContextFactory
getIndexerBatchContextFactory()
java.util.Map<java.lang.String,java.lang.String>
getIndexerHints()
IndexerQueriesExecutor
getIndexerQueriesExecutor()
IndexOperation
getIndexOperation()
long
getIndexOperationId()
java.util.List<PK>
getPks()
boolean
isExternalIndexOperation()
void
setExternalIndexOperation(boolean externalIndexOperation)
Sets the external index operation to be used.void
setFacetSearchConfig(FacetSearchConfig facetSearchConfig)
Sets the facet search config to be used.void
setIndex(Index index)
Sets the index to be usedvoid
setIndexedProperties(java.util.Collection<IndexedProperty> indexedProperties)
Sets the indexed properties to be usedvoid
setIndexedType(IndexedType indexedType)
Sets the indexed type to be usedvoid
setIndexer(Indexer indexer)
void
setIndexerBatchContextFactory(IndexerBatchContextFactory<?> indexerBatchContextFactory)
void
setIndexerHints(java.util.Map<java.lang.String,java.lang.String> indexerHints)
Sets the indexer hints to be usedvoid
setIndexerQueriesExecutor(IndexerQueriesExecutor indexerQueriesExecutor)
void
setIndexOperation(IndexOperation indexOperation)
Sets the index operation to be usedvoid
setIndexOperationId(long indexOperationId)
Sets the indexed operation id to be usedvoid
setPks(java.util.List<PK> pks)
Sets the pks to be usedprotected void
validateRequiredFields()
-
-
-
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:IndexerBatchStrategy
Sets the external index operation to be used.- Specified by:
setExternalIndexOperation
in interfaceIndexerBatchStrategy
- Parameters:
externalIndexOperation
- - the external index operation
-
getFacetSearchConfig
public FacetSearchConfig getFacetSearchConfig()
-
setFacetSearchConfig
public void setFacetSearchConfig(FacetSearchConfig facetSearchConfig)
Description copied from interface:IndexerBatchStrategy
Sets the facet search config to be used.- Specified by:
setFacetSearchConfig
in interfaceIndexerBatchStrategy
- Parameters:
facetSearchConfig
- - the facet search config to be used
-
getIndex
public Index getIndex()
-
setIndex
public void setIndex(Index index)
Description copied from interface:IndexerBatchStrategy
Sets the index to be used- Specified by:
setIndex
in 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:IndexerBatchStrategy
Sets the indexed properties to be used- Specified by:
setIndexedProperties
in interfaceIndexerBatchStrategy
- Parameters:
indexedProperties
- - the indexed properties to be used
-
getIndexedType
public IndexedType getIndexedType()
-
setIndexedType
public void setIndexedType(IndexedType indexedType)
Description copied from interface:IndexerBatchStrategy
Sets the indexed type to be used- Specified by:
setIndexedType
in 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:IndexerBatchStrategy
Sets the indexer hints to be used- Specified by:
setIndexerHints
in interfaceIndexerBatchStrategy
- Parameters:
indexerHints
- - the indexer hints to be used
-
getIndexOperation
public IndexOperation getIndexOperation()
-
setIndexOperation
public void setIndexOperation(IndexOperation indexOperation)
Description copied from interface:IndexerBatchStrategy
Sets the index operation to be used- Specified by:
setIndexOperation
in interfaceIndexerBatchStrategy
- Parameters:
indexOperation
- - the index operation to be used
-
getIndexOperationId
public long getIndexOperationId()
-
setIndexOperationId
public void setIndexOperationId(long indexOperationId)
Description copied from interface:IndexerBatchStrategy
Sets the indexed operation id to be used- Specified by:
setIndexOperationId
in 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:IndexerBatchStrategy
Sets the pks to be used- Specified by:
setPks
in interfaceIndexerBatchStrategy
- Parameters:
pks
- - the pks to be used
-
execute
public void execute() throws java.lang.InterruptedException, IndexerException
Description copied from interface:IndexerBatchStrategy
Executes the strategy.- Specified by:
execute
in 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:
IndexerException
java.lang.InterruptedException
-
-