Class DefaultSolrIndexOperationService
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.solr.impl.DefaultSolrIndexOperationService
-
- All Implemented Interfaces:
SolrIndexOperationService
public class DefaultSolrIndexOperationService extends java.lang.Object implements SolrIndexOperationService
Default implementation ofSolrIndexOperationService.
-
-
Constructor Summary
Constructors Constructor Description DefaultSolrIndexOperationService()
-
Method Summary
All Methods Instance Methods Concrete 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.ModelServicegetModelService()SolrIndexOperationModelgetOperationForId(long id)finds an index operation by id.SolrIndexOperationDaogetSolrIndexOperationDao()TimeServicegetTimeService()voidsetModelService(ModelService modelService)voidsetSolrIndexOperationDao(SolrIndexOperationDao solrIndexOperationDao)voidsetTimeService(TimeService timeService)SolrIndexOperationModelstartOperation(SolrIndexModel index, long id, IndexOperation operation, boolean external)Starts an index operation.
-
-
-
Method Detail
-
getOperationForId
public SolrIndexOperationModel getOperationForId(long id) throws SolrServiceException
Description copied from interface:SolrIndexOperationServicefinds an index operation by id.- Specified by:
getOperationForIdin interfaceSolrIndexOperationService- Parameters:
id- unique identifier- Returns:
- the index operation
- Throws:
SolrIndexOperationNotFoundException- if the index operation cannot be foundSolrServiceException- if an error occurs
-
startOperation
public SolrIndexOperationModel startOperation(SolrIndexModel index, long id, IndexOperation operation, boolean external) throws SolrServiceException
Description copied from interface:SolrIndexOperationServiceStarts an index operation.- Specified by:
startOperationin interfaceSolrIndexOperationService- 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
public SolrIndexOperationModel endOperation(long id, boolean indexError) throws SolrServiceException
Description copied from interface:SolrIndexOperationServiceEnd the index operation with statuses SUCCESS or FAILED depending on the indexError.- Specified by:
endOperationin interfaceSolrIndexOperationService- 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
public SolrIndexOperationModel cancelOperation(long id) throws SolrServiceException
Description copied from interface:SolrIndexOperationServiceCancels the index operation.- Specified by:
cancelOperationin interfaceSolrIndexOperationService- Parameters:
id- unique identifier- Returns:
- newly canceled index operation
- Throws:
SolrIndexOperationNotFoundException- if the index operation cannot be foundSolrServiceException- if an error occurs
-
getLastIndexOperationTime
public java.util.Date getLastIndexOperationTime(SolrIndexModel index) throws SolrServiceException
Description copied from interface:SolrIndexOperationServiceGet 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.- Specified by:
getLastIndexOperationTimein interfaceSolrIndexOperationService- Parameters:
index- the index- Returns:
- time of the last operation
- Throws:
SolrServiceException- if an error occurs
-
getSolrIndexOperationDao
public SolrIndexOperationDao getSolrIndexOperationDao()
-
setSolrIndexOperationDao
public void setSolrIndexOperationDao(SolrIndexOperationDao solrIndexOperationDao)
-
getModelService
public ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getTimeService
public TimeService getTimeService()
-
setTimeService
public void setTimeService(TimeService timeService)
-
-