Package org.jboss.util
Class WaitSemaphore
- java.lang.Object
-
- org.jboss.util.Semaphore
-
- org.jboss.util.WaitSemaphore
-
-
Field Summary
Fields Modifier and Type Field Description private int
m_waiters
private static int
MAX_USERS_ALLOWED
-
Constructor Summary
Constructors Constructor Description WaitSemaphore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doNotify()
Wakes up this sync that has been posed in wait status by aWaitSync.doWait()
call.void
doWait()
Pone in wait status this sync, untilWaitSync.doNotify()
is called to wake it up.int
getWaiters()
java.lang.String
toString()
-
Methods inherited from class org.jboss.util.Semaphore
acquire, getUsers, logAcquire, logDeadlock, logRelease, release, waitImpl
-
-
-
-
Field Detail
-
MAX_USERS_ALLOWED
private static final int MAX_USERS_ALLOWED
- See Also:
- Constant Field Values
-
m_waiters
private int m_waiters
-
-
Method Detail
-
doWait
public void doWait() throws java.lang.InterruptedException
Description copied from interface:WaitSync
Pone in wait status this sync, untilWaitSync.doNotify()
is called to wake it up.- Specified by:
doWait
in interfaceWaitSync
- Throws:
java.lang.InterruptedException
- See Also:
WaitSync.doNotify()
-
doNotify
public void doNotify() throws java.lang.InterruptedException
Description copied from interface:WaitSync
Wakes up this sync that has been posed in wait status by aWaitSync.doWait()
call. If this sync is not waiting, invoking this method should have no effect.- Specified by:
doNotify
in interfaceWaitSync
- Throws:
java.lang.InterruptedException
- See Also:
WaitSync.doWait()
-
getWaiters
public int getWaiters()
-
-