Class OrderOpsMessageLockService
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionobtainLock
(@NonNull org.springframework.messaging.Message<?> message, @NonNull String listenerName) void
purgeLocks
(Duration messageLockTtl) void
releaseLock
(String lockToken)
-
Field Details
-
MESSAGE_IDEMPOTENCY_KEY
- See Also:
-
-
Constructor Details
-
OrderOpsMessageLockService
-
-
Method Details
-
obtainLock
public String obtainLock(@NonNull @NonNull org.springframework.messaging.Message<?> message, @NonNull @NonNull String listenerName) - Specified by:
obtainLock
in interfacecom.broadleafcommerce.common.messaging.service.MessageLockService
-
releaseLock
- Specified by:
releaseLock
in interfacecom.broadleafcommerce.common.messaging.service.MessageLockService
-
purgeLocks
- Specified by:
purgeLocks
in interfacecom.broadleafcommerce.common.messaging.service.MessageLockService
-