Package io.jmix.pessimisticlock
Interface LockManager
- All Known Implementing Classes:
- LockManagerImpl
public interface LockManager
- 
Field SummaryFields
- 
Method SummaryModifier 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- 
lockTry to lock an arbitrary object.- Parameters:
- name- locking object name
- id- 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
 
- 
lockTry 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
 
- 
unlockUnlock an arbitrary object.- Parameters:
- name- locking object name
- id- locking object ID
 
- 
unlockUnlock an entity.- Parameters:
- entity- entity instance
 
- 
getLockInfoGet locking status for particular object- Parameters:
- name- locking object name
- id- 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
 
- 
getCurrentLocksCollection<LockInfo> getCurrentLocks()Collection of current locks
- 
expireLocksvoid expireLocks()Process locks expiring. All expired locks will be removed.
- 
reloadConfigurationvoid reloadConfiguration()
 
-