|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.apache.avalon.excalibur.concurrent.Semaphore
| Constructor Summary | |
Semaphore(long tokens)
|
|
| Method Summary | |
void |
acquire()
Aquire access to resource. |
boolean |
attempt(long msecs)
Aquire access to resource. |
void |
release()
Release lock. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Semaphore(long tokens)
| Method Detail |
public void acquire()
throws java.lang.InterruptedException
Syncacquire in interface Syncorg.apache.avalon.excalibur.concurrent.Syncjava.lang.InterruptedException - if an error occurspublic void release()
Syncrelease in interface Sync
public boolean attempt(long msecs)
throws java.lang.InterruptedException
Syncattempt in interface Syncorg.apache.avalon.excalibur.concurrent.Syncmsec - the duration to wait for lock to be releasedjava.lang.InterruptedException - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||