|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javatest.ResourceTable
public class ResourceTable
A table providing simple named locks for arbitrary resources.
Constructor Summary | |
---|---|
ResourceTable()
Create a resource table. |
|
ResourceTable(int initialSize)
Create a resource table of a specified size. |
Method Summary | |
---|---|
boolean |
acquire(java.lang.String[] resourceNames,
int timeout)
Try to acquire a set of named locks. |
void |
release(java.lang.String[] resourceNames)
Release a set of previously acquired locks. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceTable()
public ResourceTable(int initialSize)
initialSize
- a hint as to the initial capacity to make the tableMethod Detail |
---|
public boolean acquire(java.lang.String[] resourceNames, int timeout) throws java.lang.InterruptedException
resourceNames
- a list of names identifying locks to be acquired.timeout
- a maximum time, in milliseconds to ait for the locks to become available.
java.lang.InterruptedException
- is the method was interrupted while
waiting for the locks to become available.public void release(java.lang.String[] resourceNames)
resourceNames
- the names of the locks to be released
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |