public class DefaultIndexerBatchContextFactory extends Object implements IndexerBatchContextFactory<DefaultIndexerBatchContext>
IndexerBatchContextFactory. 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 |
|---|
DefaultIndexerBatchContextFactory() |
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 DefaultIndexerBatchContext createContext(long indexOperationId, IndexOperation indexOperation, boolean externalIndexOperation, FacetSearchConfig facetSearchConfig, IndexedType indexedType, Collection<IndexedProperty> indexedProperties)
IndexerBatchContextFactorycreateContext in interface IndexerBatchContextFactory<DefaultIndexerBatchContext>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
IndexerBatchContextFactoryExtendedIndexerBatchListener.afterPrepareContext(IndexerBatchContext)).prepareContext in interface IndexerBatchContextFactory<DefaultIndexerBatchContext>IndexerException - if an error occurs during the listeners executionpublic void initializeContext()
throws IndexerException
IndexerBatchContextFactoryIndexerBatchListener.beforeBatch(IndexerBatchContext)).initializeContext in interface IndexerBatchContextFactory<DefaultIndexerBatchContext>IndexerException - if an error occurs during the listeners executionpublic DefaultIndexerBatchContext getContext()
IndexerBatchContextFactorygetContext in interface IndexerBatchContextFactory<DefaultIndexerBatchContext>public void destroyContext()
throws IndexerException
IndexerBatchContextFactoryIndexerBatchListener.afterBatch(IndexerBatchContext)).destroyContext in interface IndexerBatchContextFactory<DefaultIndexerBatchContext>IndexerException - if an error occurs during the listeners executionpublic void destroyContext(Exception failureException)
IndexerBatchContextFactoryIndexerBatchListener.afterBatchError(IndexerBatchContext)).destroyContext in interface IndexerBatchContextFactory<DefaultIndexerBatchContext>protected void executeAfterPrepareListeners(DefaultIndexerBatchContext context) throws IndexerException
IndexerExceptionprotected void executeBeforeBatchListeners(DefaultIndexerBatchContext batchContext) throws IndexerException
IndexerExceptionprotected void executeAfterBatchListeners(DefaultIndexerBatchContext batchContext) throws IndexerException
IndexerExceptionprotected void executeAfterBatchErrorListeners(DefaultIndexerBatchContext batchContext)
protected List<ExtendedIndexerBatchListener> getExtendedListeners(DefaultIndexerBatchContext context)
protected List<IndexerBatchListener> getListeners(DefaultIndexerBatchContext batchContext)
protected void createLocalSessionContext()
protected void removeLocalSessionContext()
Copyright © 2017 SAP SE. All Rights Reserved.