@Service(value="cuba_LockService") public class LockServiceBean extends java.lang.Object implements LockService
NAME
Constructor and Description |
---|
LockServiceBean() |
Modifier and Type | Method and Description |
---|---|
java.util.List<LockInfo> |
getCurrentLocks()
List of current locks
|
LockInfo |
getLockInfo(java.lang.String name,
java.lang.String id)
Get locking status for particular object
|
LockInfo |
lock(Entity entity)
Try to lock an entity.
|
LockInfo |
lock(java.lang.String name,
java.lang.String id)
Try to lock an arbitrary object.
|
void |
reloadConfiguration() |
void |
unlock(Entity entity)
Unlock an entity.
|
void |
unlock(java.lang.String name,
java.lang.String id)
Unlock an arbitrary object.
|
public LockInfo lock(java.lang.String name, java.lang.String id)
LockService
lock
in interface LockService
name
- locking object nameid
- locking object IDLockNotSupported
instance in case of locking is not configured for this object,LockInfo
instance in case of this object is already locked by someone@Nullable public LockInfo lock(Entity entity)
LockService
lock
in interface LockService
entity
- entity instanceLockNotSupported
instance in case of locking is not configured for this entity,LockInfo
instance in case of this entity is already locked by someonepublic void unlock(java.lang.String name, java.lang.String id)
LockService
unlock
in interface LockService
name
- locking object nameid
- locking object IDpublic void unlock(Entity entity)
LockService
unlock
in interface LockService
entity
- entity instancepublic LockInfo getLockInfo(java.lang.String name, java.lang.String id)
LockService
getLockInfo
in interface LockService
name
- locking object nameid
- locking object IDLockNotSupported
instance in case of locking is not configured for this object,LockInfo
instance in case of this object is locked by someonepublic java.util.List<LockInfo> getCurrentLocks()
LockService
getCurrentLocks
in interface LockService
public void reloadConfiguration()
reloadConfiguration
in interface LockService