Interface IndexerContext
-
- All Known Implementing Classes:
DefaultIndexerContext
public interface IndexerContextThis 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).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIndexerContext.Status
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>getAttributes()Returns a mutableMapthat can be used to store attributes associated with thisIndexerContext.FacetSearchConfiggetFacetSearchConfig()Returns the facet search configuration.java.util.List<java.lang.Exception>getFailureExceptions()Returns all failure causing exceptions for thisIndexerContext.IndexgetIndex()Returns the index to use during the indexer operation.java.util.Collection<IndexedProperty>getIndexedProperties()Returns the indexed properties to be indexed.IndexedTypegetIndexedType()Returns the indexed type.java.util.Map<java.lang.String,java.lang.String>getIndexerHints()Returns a mutableMapthat can be used to store indexer hints.IndexOperationgetIndexOperation()Returns the index operation.longgetIndexOperationId()Returns the index operation id.java.util.List<PK>getPks()Returns the pks of the items to be indexed.IndexerContext.StatusgetStatus()Returns the current status for thisIndexerContextbooleanisExternalIndexOperation()Returnstrueif the index operation is external.voidsetIndex(Index index)Sets the index to use during the indexer operation.voidsetPks(java.util.List<PK> pks)Sets the pks of the items to be indexed.
-
-
-
Method Detail
-
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()
Returnstrueif the index operation is external. An external operation does not use a default indexer query.- Returns:
trueif the index operation is external,falseotherwise
-
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
java.util.Collection<IndexedProperty> getIndexedProperties()
Returns the indexed properties to be indexed.- Returns:
- the indexed properties to be indexed
-
getPks
java.util.List<PK> getPks()
Returns the pks of the items to be indexed.- Returns:
- pks of the items to be indexed
-
setPks
void setPks(java.util.List<PK> pks)
Sets the pks of the items to be indexed.- Parameters:
pks- - the pks of the items to be indexed- Throws:
java.lang.IllegalStateException- if this method is called and the status is notIndexerContext.Status.CREATEDorIndexerContext.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
java.util.Map<java.lang.String,java.lang.String> getIndexerHints()
Returns a mutableMapthat can be used to store indexer hints.- Returns:
- the map containing the indexer hints
-
getAttributes
java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Returns a mutableMapthat can be used to store attributes associated with thisIndexerContext.- Returns:
- the map containing the attributes
-
getStatus
IndexerContext.Status getStatus()
Returns the current status for thisIndexerContext- Returns:
- the current status
-
getFailureExceptions
java.util.List<java.lang.Exception> getFailureExceptions()
Returns all failure causing exceptions for thisIndexerContext.
-
-