|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.itinnovation.grid.pbac2.pdp.locking.LockSet
public class LockSet
A set of named locks.
| Constructor Summary | |
|---|---|
LockSet()
|
|
| Method Summary | |
|---|---|
String |
getLockedFor(String resourceID)
Ensure that the lock is held. |
void |
lockResource(String resourceID,
String reason,
long timeout)
Lock a resource by name. |
void |
unlockResource(String resourceID)
Unlock the resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LockSet()
| Method Detail |
|---|
public void lockResource(String resourceID,
String reason,
long timeout)
throws AcquireResourceLockTimeoutException
resourceID - name of the resource to lockreason - string to associate with locktimeout - time in ms to wait for lock
AcquireResourceLockTimeoutException - if the lock could not be acquired within a time limit.
public void unlockResource(String resourceID)
throws ResourceNotLockedException
ResourceNotLockedException
public String getLockedFor(String resourceID)
throws ResourceNotLockedException
ResourceNotLockedException - if not locked
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||