Package com.skava.oms.service.order
Interface GetLockOrderService
- All Superinterfaces:
CustomEcommService<LockOrderRequest,
,Order> com.skava.core.EcommService<LockOrderRequest,
Order>
- All Known Implementing Classes:
GetLockOrderServiceImpl
This Interface is used to get the Order after Locking it. And other lock related operations.
GetLockOrderService interface.
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionorg.redisson.api.RLock
getLockObj
(String orderId) This method is used to get a fair lock for the given orderId.void
releaseLock
(Order order) This method is used to release the lock for given orderId by checking the identical lock objects available in database and in order.void
releaseLock
(Order order, boolean revert) This method is used to release the lock for given orderId by checking the identical lock objects available in database and in order.Methods inherited from interface com.skava.oms.service.CustomEcommService
getValidateException
Methods inherited from interface com.skava.core.EcommService
getValidator, getValidator, process
-
Method Details
-
getLockObj
This method is used to get a fair lock for the given orderId.- Parameters:
orderId
- - The order ID received from user, which is used for locking the order before patching it up.- Returns:
- It returns the
RLock
associated to the input order ID.
-
releaseLock
This method is used to release the lock for given orderId by checking the identical lock objects available in database and in order.- Parameters:
order
- - The updated order received from user.
-
releaseLock
This method is used to release the lock for given orderId by checking the identical lock objects available in database and in order.- Parameters:
order
- - The updated order received from user.revert
- - true if any exception occurred in middle of the order process, used to revert the partial update.
-