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 TypeMethodDescriptionvoid
void
lockContentItem
(String siteId, String path) Lock content item for synchronized access.@jakarta.validation.Valid boolean
boolean
tryLockContentItem
(String siteId, String path) Try to lock item for synchronized access.void
void
unlockContentItem
(String siteId, String path) Release lock on content item.
-
Field Details
-
nodeLocks
-
-
Constructor Details
-
GeneralLockServiceImpl
public GeneralLockServiceImpl()
-
-
Method Details
-
lock
- Specified by:
lock
in interfaceGeneralLockService
-
tryLock
- Specified by:
tryLock
in interfaceGeneralLockService
-
unlock
- Specified by:
unlock
in interfaceGeneralLockService
-
lockContentItem
Description copied from interface:GeneralLockService
Lock content item for synchronized access. Thread is blocked until lock is obtained.- Specified by:
lockContentItem
in interfaceGeneralLockService
- Parameters:
siteId
- site identifierpath
- content item path
-
tryLockContentItem
Description copied from interface:GeneralLockService
Try to lock item for synchronized access. If lock obtained returns true, otherwise false. Does not block thread if not available lock.- Specified by:
tryLockContentItem
in interfaceGeneralLockService
- Parameters:
siteId
-path
-- Returns:
-
unlockContentItem
Description copied from interface:GeneralLockService
Release lock on content item.- Specified by:
unlockContentItem
in interfaceGeneralLockService
- Parameters:
siteId
- site identifierpath
- path of the content item
-