Interface SolrIndexOperationService
- All Known Implementing Classes:
DefaultSolrIndexOperationService
public interface SolrIndexOperationService
Service for managing index operations.
-
Method Summary
Modifier and TypeMethodDescriptioncancelOperation(long id) Cancels the index operation.endOperation(long id, boolean indexError) End the index operation with statuses SUCCESS or FAILED depending on the indexError.Get end time of the last successful FULL or UPDATE indexing operation for the given index.getOperationForId(long id) finds an index operation by id.startOperation(SolrIndexModel index, long id, IndexOperation operation, boolean external) Starts an index operation.
-
Method Details
-
getOperationForId
finds an index operation by id.- Parameters:
id- unique identifier- Returns:
- the index operation
- Throws:
SolrIndexOperationNotFoundException- if the index operation cannot be foundSolrServiceException- if an error occurs
-
startOperation
SolrIndexOperationModel startOperation(SolrIndexModel index, long id, IndexOperation operation, boolean external) throws SolrServiceException Starts an index operation.- Parameters:
index- the indexid- the operation idoperation- the type of operationexternal- indicates if the index operation is external- Returns:
- newly created running index operation
- Throws:
SolrServiceException- if an error occurs
-
endOperation
End the index operation with statuses SUCCESS or FAILED depending on the indexError.- Parameters:
id- unique identifierindexError- true/false- Returns:
- the finished index operation
- Throws:
SolrIndexOperationNotFoundException- if the index operation cannot be foundSolrServiceException- if an error occurs
-
cancelOperation
Cancels the index operation.- Parameters:
id- unique identifier- Returns:
- newly canceled index operation
- Throws:
SolrIndexOperationNotFoundException- if the index operation cannot be foundSolrServiceException- if an error occurs
-
getLastIndexOperationTime
Get end time of the last successful FULL or UPDATE indexing operation for the given index. If no operation was found,new Date(0L)is returned.- Parameters:
index- the index- Returns:
- time of the last operation
- Throws:
SolrServiceException- if an error occurs
-