Class GeneralLockServiceImpl
java.lang.Object
org.craftercms.studio.impl.v1.service.GeneralLockServiceImpl
- All Implemented Interfaces:
GeneralLockService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidlockContentItem(String siteId, String path) Lock content item for synchronized access.@jakarta.validation.Valid booleanbooleantryLockContentItem(String siteId, String path) Try to lock item for synchronized access.voidvoidunlockContentItem(String siteId, String path) Release lock on content item.
-
Field Details
-
nodeLocks
-
-
Constructor Details
-
GeneralLockServiceImpl
public GeneralLockServiceImpl()
-
-
Method Details
-
lock
- Specified by:
lockin interfaceGeneralLockService
-
tryLock
- Specified by:
tryLockin interfaceGeneralLockService
-
unlock
- Specified by:
unlockin interfaceGeneralLockService
-
lockContentItem
Description copied from interface:GeneralLockServiceLock content item for synchronized access. Thread is blocked until lock is obtained.- Specified by:
lockContentItemin interfaceGeneralLockService- Parameters:
siteId- site identifierpath- content item path
-
tryLockContentItem
Description copied from interface:GeneralLockServiceTry to lock item for synchronized access. If lock obtained returns true, otherwise false. Does not block thread if not available lock.- Specified by:
tryLockContentItemin interfaceGeneralLockService- Parameters:
siteId-path-- Returns:
-
unlockContentItem
Description copied from interface:GeneralLockServiceRelease lock on content item.- Specified by:
unlockContentItemin interfaceGeneralLockService- Parameters:
siteId- site identifierpath- path of the content item
-