public class DefaultIndexerContextFactory extends Object implements IndexerContextFactory<DefaultIndexerContext>
IndexerContextFactory. It uses a thread local variable for storing the context.| Modifier and Type | Field and Description |
|---|---|
static String |
EXTENDED_LISTENERS_KEY |
static String |
LISTENERS_KEY |
| Constructor and Description |
|---|
DefaultIndexerContextFactory() |
public static final String LISTENERS_KEY
public static final String EXTENDED_LISTENERS_KEY
public SessionService getSessionService()
public void setSessionService(SessionService sessionService)
public ListenersFactory getListenersFactory()
public void setListenersFactory(ListenersFactory listenersFactory)
public DefaultIndexerContext createContext(long indexOperationId, IndexOperation indexOperation, boolean externalIndexOperation, FacetSearchConfig facetSearchConfig, IndexedType indexedType, Collection<IndexedProperty> indexedProperties)
IndexerContextFactorycreateContext in interface IndexerContextFactory<DefaultIndexerContext>indexOperationId - - the index operation idindexOperation - - the index operationexternalIndexOperation - - indicates if the index operation is externalfacetSearchConfig - - the facet search configurationindexedType - - the indexed typeindexedProperties - - the properties to indexpublic void prepareContext()
throws IndexerException
IndexerContextFactoryExtendedIndexerListener.afterPrepareContext(IndexerContext)).prepareContext in interface IndexerContextFactory<DefaultIndexerContext>IndexerException - if an error occurs during the listeners executionpublic void initializeContext()
throws IndexerException
IndexerContextFactoryIndexerListener.beforeIndex(IndexerContext)).initializeContext in interface IndexerContextFactory<DefaultIndexerContext>IndexerException - if an error occurs during the listeners executionpublic DefaultIndexerContext getContext()
IndexerContextFactorygetContext in interface IndexerContextFactory<DefaultIndexerContext>public void destroyContext()
throws IndexerException
IndexerContextFactoryIndexerListener.afterIndex(IndexerContext)).destroyContext in interface IndexerContextFactory<DefaultIndexerContext>IndexerException - if an error occurs during the listeners executionpublic void destroyContext(Exception failureException)
IndexerContextFactoryIndexerListener.afterIndexError(IndexerContext)).destroyContext in interface IndexerContextFactory<DefaultIndexerContext>protected void executeAfterPrepareListeners(DefaultIndexerContext context) throws IndexerException
IndexerExceptionprotected void executeBeforeIndexListeners(DefaultIndexerContext context) throws IndexerException
IndexerExceptionprotected void executeAfterIndexListeners(DefaultIndexerContext context) throws IndexerException
IndexerExceptionprotected void executeAfterIndexErrorListeners(DefaultIndexerContext context)
protected List<ExtendedIndexerListener> getExtendedListeners(DefaultIndexerContext context)
protected List<IndexerListener> getListeners(DefaultIndexerContext context)
protected void createLocalSessionContext()
protected void removeLocalSessionContext()
Copyright © 2017 SAP SE. All Rights Reserved.