Package io.jmix.core.pessimisticlocking
Interface LockManager
- All Known Implementing Classes:
LockManagerImpl
public interface LockManager
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidProcess locks expiring.Collection of current locksgetLockInfo(String name, String id) Get locking status for particular objectTry to lock an entity.Try to lock an arbitrary object.voidvoidUnlock an entity.voidUnlock an arbitrary object.
-
Field Details
-
LOCKS_CACHE_NAME
- See Also:
-
-
Method Details
-
lock
Try to lock an arbitrary object.- Parameters:
name- locking object nameid- locking object ID- Returns:
- - null in case of successful lock,
-LockNotSupportedinstance in case of locking is not configured for this object,
-LockInfoinstance in case of this object is already locked by someone
-
lock
Try to lock an entity.- Parameters:
entity- entity instance- Returns:
- - null in case of successful lock,
-LockNotSupportedinstance in case of locking is not configured for this entity,
-LockInfoinstance in case of this entity is already locked by someone
-
unlock
Unlock an arbitrary object.- Parameters:
name- locking object nameid- locking object ID
-
unlock
Unlock an entity.- Parameters:
entity- entity instance
-
getLockInfo
Get locking status for particular object- Parameters:
name- locking object nameid- locking object ID- Returns:
- - null in case of no lock,
-LockNotSupportedinstance in case of locking is not configured for this object,
-LockInfoinstance in case of this object is locked by someone
-
getCurrentLocks
Collection<LockInfo> getCurrentLocks()Collection of current locks -
expireLocks
void expireLocks()Process locks expiring. All expired locks will be removed. -
reloadConfiguration
void reloadConfiguration()
-