Interface GeneralLockService
-
- All Known Implementing Classes:
GeneralLockServiceImpl
public interface GeneralLockService
-
-
Field Summary
Fields Modifier and Type Field Description static String
MASTER_LOCK
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
lock(String objectId)
void
lockContentItem(String siteId, String path)
Lock content item for synchronized access.boolean
tryLock(String objectId)
boolean
tryLockContentItem(String siteId, String path)
Try to lock item for synchronized access.void
unlock(String objectId)
void
unlockContentItem(String siteId, String path)
Release lock on content item.
-
-
-
Field Detail
-
MASTER_LOCK
static final String MASTER_LOCK
- See Also:
- Constant Field Values
-
-
Method Detail
-
lock
void lock(String objectId)
-
unlock
void unlock(String objectId)
-
tryLock
boolean tryLock(String objectId)
-
lockContentItem
void lockContentItem(String siteId, String path)
Lock content item for synchronized access. Thread is blocked until lock is obtained.- Parameters:
siteId
- site identifierpath
- content item path
-
tryLockContentItem
boolean tryLockContentItem(String siteId, String path)
Try to lock item for synchronized access. If lock obtained returns true, otherwise false. Does not block thread if not available lock.- Parameters:
siteId
-path
-- Returns:
-
-