|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GlobalLock
Interface for a GlobalLock. The GlobalLockingService implementation will return an instance of one of these for the locking implementation. All operations on a lock object (extending the timeout, releasing the lock, etc) happen through this interface.
Method Summary | |
---|---|
java.lang.String |
getGroup()
|
java.lang.String |
getName()
|
boolean |
isValid()
|
void |
release()
relelase the lock. |
void |
setExpirationTime(long millisFromNow)
Set the lifetime of the lock. |
void |
setGroup(java.lang.String groupName)
Add this lock to the specified lock group |
Method Detail |
---|
boolean isValid()
java.lang.String getName()
java.lang.String getGroup()
void setGroup(java.lang.String groupName) throws GlobalLockingException
groupName
- The name of the group. It must already exist
Throw
- global locking exception on error. Errors are
1) the lock is not valid, 2) the lock group does not exist, and
3) there is no more room in the group
GlobalLockingException
void release() throws GlobalLockingException
if
- the lock is invalid (has expired or was released)
GlobalLockingException
void setExpirationTime(long millisFromNow) throws GlobalLockingException
millisFromNow
- Milliseconds from now for the new expiration
GlobalLockingException
- if the lock is not valid (has
already expired, or was released)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |