Class DefaultIdempotentPersistenceNotificationConsumptionService

    • Field Detail

      • resourceLockRepository

        protected final com.broadleafcommerce.common.messaging.repository.ResourceLockRepository<?,​?> resourceLockRepository
    • Constructor Detail

      • DefaultIdempotentPersistenceNotificationConsumptionService

        public DefaultIdempotentPersistenceNotificationConsumptionService​(com.broadleafcommerce.common.messaging.repository.ResourceLockRepository<?,​?> resourceLockRepository)
    • Method Detail

      • consumeNotification

        public void consumeNotification​(@NonNull
                                        @NonNull com.fasterxml.jackson.databind.JsonNode entityJson,
                                        @NonNull
                                        @NonNull String handlerName,
                                        @NonNull
                                        @NonNull Consumer<com.fasterxml.jackson.databind.JsonNode> operation)
        Description copied from interface: IdempotentPersistenceNotificationConsumptionService
        Executes the provided operation if the JsonNode's idempotency check passes. If the check fails the idempotency check, then we'll quietly return to the caller without executing the operation.
        Specified by:
        consumeNotification in interface IdempotentPersistenceNotificationConsumptionService
        Parameters:
        entityJson - The JsonNode that is to be processed.
        handlerName - The name of the persistence notification handler. This value can be used to distinguish this notification consumption from that of a different handler.
        operation - The operation that is to be executed, without a return value
      • getResourceLockRepository

        protected com.broadleafcommerce.common.messaging.repository.ResourceLockRepository<?,​?> getResourceLockRepository()