|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.cc.framework.common.Semaphore
Semaphore object by Dijkstra. A semaphore is an object which defines two operations p() and v(). Internally a semaphore has a value an a state where processes can wait.
| Field Summary | |
private int |
counter
Der Wert des Semaphors gibt an: positiv: Anzahl der noch verfügbaren Betriebsmittel negativ: Anzahl der wartenden Prozesse |
| Constructor Summary | |
Semaphore()
Constructor for Semaphore |
|
Semaphore(int counter)
Constructor for Semaphore |
|
| Method Summary | |
void |
p()
Die p()-Operation ist das eintrittsprotokoll des Semaphors. |
void |
v()
Die v()-Operation ist das Austrittsprotokoll des Semaphors. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int counter
| Constructor Detail |
public Semaphore()
public Semaphore(int counter)
counter - Counter| Method Detail |
public void p()
throws java.lang.InterruptedException
java.lang.InterruptedException - Thrown when a thread is waiting, sleeping, or otherwise
paused for a long time and another thread interrupts itpublic void v()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||