|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.pool.impl.FairnessSemaphore
public class FairnessSemaphore
Semaphore with fairness feature.
| Constructor Summary | |
|---|---|
FairnessSemaphore(int size)
constructor. |
|
| Method Summary | |
|---|---|
void |
acquire()
acquire semaphore with unlimited timeout. |
void |
acquire(long waitTime)
acquire semaphore with timeout |
void |
release()
release semaphore |
void |
setSize(int size)
set semaphore size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FairnessSemaphore(int size)
size - semaphore size, that assures maximum concurrent thread number| Method Detail |
|---|
public void acquire()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void acquire(long waitTime)
throws java.lang.InterruptedException
waitTime - maximum waiting time before getting semaphore
java.lang.InterruptedExceptionpublic void release()
public void setSize(int size)
size - semaphore size
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||