Class SolrIndexStatusServiceImpl
java.lang.Object
org.broadleafcommerce.core.search.service.solr.index.SolrIndexStatusServiceImpl
- All Implemented Interfaces:
SolrIndexStatusService
@Service("blSolrIndexStatusService")
public class SolrIndexStatusServiceImpl
extends Object
implements SolrIndexStatusService
- Author:
- Jeff Fischer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIndexErrorStatus(Long eventId, Integer eventRetryCount, Date eventCreatedDate) Will add a new IndexError entry if one does not exist.voidaddIndexStatus(Long eventId, Date eventCreatedDate) Adds a new IndexStatusInfo given the eventId and the create dateprotected voidclearErrorStatus(IndexStatusInfo status) Removes an existing error status entry.Returns a populated IndexStatusInfo instance from the provider(s)Provide a custom IndexStatusInfo instance to be used by the system.isEventIdInError(Collection<String> additionalInfoIds, IndexStatusInfo persistedStatus) Determines which passed InfoIds already exist in the persisted statuses from the provider(s)voidsetIndexStatus(IndexStatusInfo status) Adds an IndexStatusInfo entry into the status providersprotected voidupdateIndexStatus(IndexStatusInfo status) Performs the actual update process with the list of providers
-
Field Details
-
providers
-
solrIndexStatusErrorRetryCount
-
-
Constructor Details
-
SolrIndexStatusServiceImpl
public SolrIndexStatusServiceImpl()
-
-
Method Details
-
addIndexStatus
Description copied from interface:SolrIndexStatusServiceAdds a new IndexStatusInfo given the eventId and the create date- Specified by:
addIndexStatusin interfaceSolrIndexStatusService
-
getIndexStatus
Description copied from interface:SolrIndexStatusServiceReturns a populated IndexStatusInfo instance from the provider(s)- Specified by:
getIndexStatusin interfaceSolrIndexStatusService- Returns:
- the index status information
-
setIndexStatus
Description copied from interface:SolrIndexStatusServiceAdds an IndexStatusInfo entry into the status providers- Specified by:
setIndexStatusin interfaceSolrIndexStatusService
-
addIndexErrorStatus
Will add a new IndexError entry if one does not exist. If one exists, it will increment the retry count. If the retry count is exceeded, it will move the event to the dead events list and treat the event as if it were successful- Specified by:
addIndexErrorStatusin interfaceSolrIndexStatusService- Parameters:
eventId- The id of the event producing the erroreventRetryCount- The retry count as defined by the eventeventCreatedDate- The date that the event was created
-
getSeedStatusInstance
Description copied from interface:SolrIndexStatusServiceProvide a custom IndexStatusInfo instance to be used by the system.- Specified by:
getSeedStatusInstancein interfaceSolrIndexStatusService- Returns:
-
updateIndexStatus
Performs the actual update process with the list of providers- Parameters:
status-
-
clearErrorStatus
Removes an existing error status entry. The assumption is that an entry had an error condition and subsequently succeeded. Upon success, the current error entry should be removed.- Parameters:
status-
-
isEventIdInError
protected List<Long> isEventIdInError(Collection<String> additionalInfoIds, IndexStatusInfo persistedStatus) Determines which passed InfoIds already exist in the persisted statuses from the provider(s)- Parameters:
additionalInfoIds-persistedStatus-- Returns:
-