java.lang.Object
com.broadleafcommerce.orderoperation.service.messaging.checkout.idempotency.OrderOpsMessageLockService
All Implemented Interfaces:
com.broadleafcommerce.common.messaging.service.MessageLockService

public class OrderOpsMessageLockService extends Object implements com.broadleafcommerce.common.messaging.service.MessageLockService
An order operations specific implementation of the message lock service. This version uses a resources lock provider since order operations is not attached to a data source (DB) to store locks in.
Author:
Jacob Mitash
  • Field Details

  • Constructor Details

    • OrderOpsMessageLockService

      public OrderOpsMessageLockService(ResourceLockProvider resourceLockProvider)
  • Method Details

    • obtainLock

      public String obtainLock(@NonNull @NonNull org.springframework.messaging.Message<?> message, @NonNull @NonNull String listenerName)
      Specified by:
      obtainLock in interface com.broadleafcommerce.common.messaging.service.MessageLockService
    • releaseLock

      public void releaseLock(@Nullable String lockToken)
      Specified by:
      releaseLock in interface com.broadleafcommerce.common.messaging.service.MessageLockService
    • purgeLocks

      public void purgeLocks(Duration messageLockTtl)
      Specified by:
      purgeLocks in interface com.broadleafcommerce.common.messaging.service.MessageLockService