Interface IndexerContextFactory<T extends IndexerContext>

All Known Implementing Classes:
DefaultIndexerContextFactory

public interface IndexerContextFactory<T extends IndexerContext>
Implementations of this interface are responsible for creating and destroying instances of IndexerContext.

Code creating/destroying contexts should normally use the following pattern:

 try
 {
        final IndexerContext context = indexerContextFactory.createContext(externalIndexOperation, indexerOperation,
                        facetSearchConfig, indexedType, indexedProperties, pks);

        // call additional setters on the context object

        indexerContextFactory.prepareContext();

        // call the setter for the PKs.

        indexerContextFactory.initializeContext();

        // put your logic here

        indexerContextFactory.destroyContext();
 }
 catch (final IndexerException | ... | RuntimeException e)
 {
        indexerContextFactory.destroyContext(e);
        throw e;
 }