|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsleep.bridges.Semaphore
public class Semaphore
A sleep synchronization primitive. I know Java 1.5.0 has this stuff but since Sleep targets 1.4.2 I get to provide my own. How exciting.
Constructor Summary | |
---|---|
Semaphore(long initialCount)
initializes this semaphore with the specified initial count |
Method Summary | |
---|---|
long |
getCount()
returns the current count data associated with this semaphore. |
void |
P()
aquires this semaphore by attempting to decrement the count. |
java.lang.String |
toString()
returns a nice string representation of this semaphore |
void |
V()
increments this semaphore |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Semaphore(long initialCount)
Method Detail |
---|
public void P()
public long getCount()
public void V()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |