@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)
LockServicelock in interface LockServicename - 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)
LockServicelock in interface LockServiceentity - 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)
LockServiceunlock in interface LockServicename - locking object nameid - locking object IDpublic void unlock(Entity entity)
LockServiceunlock in interface LockServiceentity - entity instancepublic LockInfo getLockInfo(java.lang.String name, java.lang.String id)
LockServicegetLockInfo in interface LockServicename - 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()
LockServicegetCurrentLocks in interface LockServicepublic void reloadConfiguration()
reloadConfiguration in interface LockService