|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
LockManager represents generic lock manager that allows
obtaining and releasing locks on objects.
| Method Summary | |
|---|---|
void |
lock(java.lang.Object obj,
java.lang.Object owner,
int timeout)
Obtain lock on obj for specified owner. |
void |
unlock(java.lang.Object obj,
java.lang.Object owner)
Release lock on obj owned by specified owner. |
| Method Detail |
public void lock(java.lang.Object obj,
java.lang.Object owner,
int timeout)
throws LockNotGrantedException,
java.lang.ClassCastException,
ChannelException
obj for specified owner.
Implementation should try to obtain lock few times within the
specified timeout.
obj - obj to lock, usually not full object but object's ID.owner - object identifying entity that will own the lock.timeout - maximum time that we grant to obtain a lock.
LockNotGrantedException - if lock is not granted within
specified period.
java.lang.ClassCastException - if obj and/or
owner is not of type that implementation expects to get
(for example, when distributed lock manager obtains non-serializable
obj or owner).
ChannelException - if something bad happened to communication
channel.
public void unlock(java.lang.Object obj,
java.lang.Object owner)
throws LockNotReleasedException,
java.lang.ClassCastException,
ChannelException
obj owned by specified owner.
obj - obj to lock, usually not full object but object's ID.owner - object identifying entity that will own the lock.
LockOwnerMismatchException - if lock is owned by another object.
java.lang.ClassCastException - if obj and/or
owner is not of type that implementation expects to get
(for example, when distributed lock manager obtains non-serializable
obj or owner).
ChannelException - if something bad happened to communication
channel.
LockNotReleasedException
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||