Interface IndexerContext

All Known Implementing Classes:
DefaultIndexerContext

public interface IndexerContext
This interface represents a context valid for the duration of an indexer index operation, however it is not valid inside an indexer batch (an indexer batch may run on a different thread or even on a different machine).
  • Method Details

    • getIndexOperationId

      long getIndexOperationId()
      Returns the index operation id.
      Returns:
      the index operation id
    • getIndexOperation

      IndexOperation getIndexOperation()
      Returns the index operation.
      Returns:
      the index operation
    • isExternalIndexOperation

      boolean isExternalIndexOperation()
      Returns true if the index operation is external. An external operation does not use a default indexer query.
      Returns:
      true if the index operation is external, false otherwise
    • getFacetSearchConfig

      FacetSearchConfig getFacetSearchConfig()
      Returns the facet search configuration.
      Returns:
      the facet search configuration
    • getIndexedType

      IndexedType getIndexedType()
      Returns the indexed type.
      Returns:
      the indexed type
    • getIndexedProperties

      Collection<IndexedProperty> getIndexedProperties()
      Returns the indexed properties to be indexed.
      Returns:
      the indexed properties to be indexed
    • getPks

      List<PK> getPks()
      Returns the pks of the items to be indexed.
      Returns:
      pks of the items to be indexed
    • setPks

      void setPks(List<PK> pks)
      Sets the pks of the items to be indexed.
      Parameters:
      pks - - the pks of the items to be indexed
      Throws:
      IllegalStateException - if this method is called and the status is not IndexerContext.Status.CREATED or IndexerContext.Status.STARTING
    • getIndex

      Index getIndex()
      Returns the index to use during the indexer operation.
      Returns:
      the index to use
    • setIndex

      void setIndex(Index index)
      Sets the index to use during the indexer operation.
      Parameters:
      index - - the index to use
    • getIndexerHints

      Map<String,String> getIndexerHints()
      Returns a mutable Map that can be used to store indexer hints.
      Returns:
      the map containing the indexer hints
    • getAttributes

      Map<String,Object> getAttributes()
      Returns a mutable Map that can be used to store attributes associated with this IndexerContext.
      Returns:
      the map containing the attributes
    • getStatus

      Returns the current status for this IndexerContext
      Returns:
      the current status
    • getFailureExceptions

      List<Exception> getFailureExceptions()
      Returns all failure causing exceptions for this IndexerContext.