Class CartOpsMessageLockService
java.lang.Object
com.broadleafcommerce.cartoperation.service.messaging.idempotency.CartOpsMessageLockService
- All Implemented Interfaces:
com.broadleafcommerce.common.messaging.service.MessageLockService
public class CartOpsMessageLockService
extends Object
implements com.broadleafcommerce.common.messaging.service.MessageLockService
A cart operations specific implementation of the message lock service. This version uses a
resources lock provider since cart 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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.common.messaging.service.MessageLockService
purgeLocks
-
Field Details
-
MESSAGE_IDEMPOTENCY_KEY
- See Also:
-
-
Constructor Details
-
CartOpsMessageLockService
-
-
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
-