Class ProcessBulkUpdateRequestListener
java.lang.Object
com.broadleafcommerce.bulk.messaging.ProcessBulkUpdateRequestListener
A listener that accepts a
ProcessBulkUpdateRequest
and performs the update.- Author:
- Samarth Dhruva (samarthd)
-
Constructor Summary
ConstructorsConstructorDescriptionProcessBulkUpdateRequestListener
(BulkUpdateManager bulkUpdateManager, BulkUpdateService<BulkUpdate> bulkUpdateService, List<BulkDataRouteSupporting> routes) -
Method Summary
Modifier and TypeMethodDescriptionprotected BulkUpdateManager
protected BulkUpdateService<BulkUpdate>
protected List<BulkDataRouteSupporting>
void
handle
(ProcessBulkUpdateRequest processBulkUpdateRequest)
-
Constructor Details
-
ProcessBulkUpdateRequestListener
public ProcessBulkUpdateRequestListener(BulkUpdateManager bulkUpdateManager, BulkUpdateService<BulkUpdate> bulkUpdateService, List<BulkDataRouteSupporting> routes)
-
-
Method Details
-
handle
@StreamListener("processBulkUpdateRequestInput") public void handle(ProcessBulkUpdateRequest processBulkUpdateRequest) Delegates toBulkUpdateService.setProcessingStatus(String)
andBulkUpdateManager.processBulkUpdate(BulkUpdate)
.This handler only performs the update if the return value of
BulkUpdateService.setProcessingStatus(String)
is not null. This ensures that only the microservice whose bulk update data store has the bulk update will perform it, and the update will only be performed if theBulkUpdate.status
is valid.- Parameters:
processBulkUpdateRequest
- the request containing information about the bulk update to perform- Throws:
com.broadleafcommerce.common.messaging.exception.ResourceLockException
- if a lock could not be acquired on the bulk update
-
getBulkUpdateManager
-
getBulkUpdateService
-
getRoutes
-