Interface SolrIndexOperationService
-
- All Known Implementing Classes:
DefaultSolrIndexOperationService
public interface SolrIndexOperationServiceService for managing index operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SolrIndexOperationModelcancelOperation(long id)Cancels the index operation.SolrIndexOperationModelendOperation(long id, boolean indexError)End the index operation with statuses SUCCESS or FAILED depending on the indexError.java.util.DategetLastIndexOperationTime(SolrIndexModel index)Get end time of the last successful FULL or UPDATE indexing operation for the given index.SolrIndexOperationModelgetOperationForId(long id)finds an index operation by id.SolrIndexOperationModelstartOperation(SolrIndexModel index, long id, IndexOperation operation, boolean external)Starts an index operation.
-
-
-
Method Detail
-
getOperationForId
SolrIndexOperationModel getOperationForId(long id) throws SolrServiceException
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
SolrIndexOperationModel endOperation(long id, boolean indexError) throws SolrServiceException
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
SolrIndexOperationModel cancelOperation(long id) throws SolrServiceException
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
java.util.Date getLastIndexOperationTime(SolrIndexModel index) throws SolrServiceException
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
-
-