Class CommitModeListener
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.indexer.listeners.CommitModeListener
-
- All Implemented Interfaces:
IndexerBatchListener,IndexerListener
public class CommitModeListener extends java.lang.Object implements IndexerListener, IndexerBatchListener
Listener that applies the commit mode.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCOMMIT_MODE_HINTprotected static CommitModeDEFAULT_COMMIT_MODE
-
Constructor Summary
Constructors Constructor Description CommitModeListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterBatch(IndexerBatchContext batchContext)Handles a notification that the processing for a particularIndexerBatchContexthas just been completed.voidafterBatchError(IndexerBatchContext batchContext)Handles a notification that the processing for a particularIndexerBatchContextfailed.voidafterIndex(IndexerContext context)Handles a notification that the indexing for a particularIndexerContexthas just been completed.voidafterIndexError(IndexerContext context)Handles a notification that the indexing for a particularIndexerContextfailed.voidbeforeBatch(IndexerBatchContext batchContext)Handles a notification that the processing for a particularIndexerBatchContextis about to begin.voidbeforeIndex(IndexerContext context)Handles a notification that the indexing for a particularIndexerContextis about to begin.protected voidcommit(FacetSearchConfig facetSearchConfig, IndexedType indexedType, Index index, SolrSearchProvider.CommitType commitType)SolrSearchProviderFactorygetSolrSearchProviderFactory()protected CommitModeresolveCommitMode(FacetSearchConfig facetSearchConfig, java.util.Map<java.lang.String,java.lang.String> indexerHints)voidsetSolrSearchProviderFactory(SolrSearchProviderFactory solrSearchProviderFactory)
-
-
-
Field Detail
-
DEFAULT_COMMIT_MODE
protected static final CommitMode DEFAULT_COMMIT_MODE
-
COMMIT_MODE_HINT
protected static final java.lang.String COMMIT_MODE_HINT
- See Also:
- Constant Field Values
-
-
Method Detail
-
beforeIndex
public void beforeIndex(IndexerContext context) throws IndexerException
Description copied from interface:IndexerListenerHandles a notification that the indexing for a particularIndexerContextis about to begin.- Specified by:
beforeIndexin interfaceIndexerListener- Parameters:
context- - theIndexerContext- Throws:
IndexerException- if an error occurs
-
afterIndex
public void afterIndex(IndexerContext context) throws IndexerException
Description copied from interface:IndexerListenerHandles a notification that the indexing for a particularIndexerContexthas just been completed.- Specified by:
afterIndexin interfaceIndexerListener- Parameters:
context- - theIndexerContext- Throws:
IndexerException- if an error occurs
-
afterIndexError
public void afterIndexError(IndexerContext context) throws IndexerException
Description copied from interface:IndexerListenerHandles a notification that the indexing for a particularIndexerContextfailed.- Specified by:
afterIndexErrorin interfaceIndexerListener- Parameters:
context- - theIndexerContext- Throws:
IndexerException- if an error occurs
-
beforeBatch
public void beforeBatch(IndexerBatchContext batchContext) throws IndexerException
Description copied from interface:IndexerBatchListenerHandles a notification that the processing for a particularIndexerBatchContextis about to begin.- Specified by:
beforeBatchin interfaceIndexerBatchListener- Parameters:
batchContext- - theIndexerBatchContext- Throws:
IndexerException- if an error occurs
-
afterBatch
public void afterBatch(IndexerBatchContext batchContext) throws IndexerException
Description copied from interface:IndexerBatchListenerHandles a notification that the processing for a particularIndexerBatchContexthas just been completed.- Specified by:
afterBatchin interfaceIndexerBatchListener- Parameters:
batchContext- - theIndexerBatchContext- Throws:
IndexerException- if an error occurs
-
afterBatchError
public void afterBatchError(IndexerBatchContext batchContext) throws IndexerException
Description copied from interface:IndexerBatchListenerHandles a notification that the processing for a particularIndexerBatchContextfailed.- Specified by:
afterBatchErrorin interfaceIndexerBatchListener- Parameters:
batchContext- - theIndexerBatchContext- Throws:
IndexerException- if an error occurs
-
resolveCommitMode
protected CommitMode resolveCommitMode(FacetSearchConfig facetSearchConfig, java.util.Map<java.lang.String,java.lang.String> indexerHints)
-
commit
protected void commit(FacetSearchConfig facetSearchConfig, IndexedType indexedType, Index index, SolrSearchProvider.CommitType commitType) throws IndexerException
- Throws:
IndexerException
-
setSolrSearchProviderFactory
public void setSolrSearchProviderFactory(SolrSearchProviderFactory solrSearchProviderFactory)
-
getSolrSearchProviderFactory
public SolrSearchProviderFactory getSolrSearchProviderFactory()
-
-