@PermitAll public class LockServiceBean extends com.whitestein.lsps.common.SecureAndLoggingService implements LockServiceLocal, LockServiceRemote
Constructor and Description |
---|
LockServiceBean()
Creates new instance.
|
LockServiceBean(LockDao lockDao)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
Lock |
acquireLock(String lockName,
String message)
Acquires lock with the given lock name.
|
boolean |
isLocked(String lockName)
Returns true if a lock with the given lock name is held .
|
void |
releaseLock(String lockName)
Release lock with the given lock name.
|
public LockServiceBean()
public LockServiceBean(LockDao lockDao)
lockDao
- the lock daoNullPointerException
- if lockDao
is null@RightsAllowed(value="Lock:Manage") public Lock acquireLock(String lockName, String message)
LockService
null
, otherwise it returns Lock
that holds the locks.acquireLock
in interface LockService
message
- arbitrary message, cannot be null
null
if requested lock was acquired@RightsAllowed(value="Lock:Manage") public void releaseLock(String lockName)
LockService
releaseLock
in interface LockService
@RightsAllowed(value="Lock:Manage") public boolean isLocked(String lockName)
LockService
isLocked
in interface LockService
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.