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 intm_waitersprivate static intMAX_USERS_ALLOWED
-
Constructor Summary
Constructors Constructor Description WaitSemaphore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoNotify()Wakes up this sync that has been posed in wait status by aWaitSync.doWait()call.voiddoWait()Pone in wait status this sync, untilWaitSync.doNotify()is called to wake it up.intgetWaiters()java.lang.StringtoString()-
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.InterruptedExceptionDescription copied from interface:WaitSyncPone in wait status this sync, untilWaitSync.doNotify()is called to wake it up.- Specified by:
doWaitin interfaceWaitSync- Throws:
java.lang.InterruptedException- See Also:
WaitSync.doNotify()
-
doNotify
public void doNotify() throws java.lang.InterruptedExceptionDescription copied from interface:WaitSyncWakes 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:
doNotifyin interfaceWaitSync- Throws:
java.lang.InterruptedException- See Also:
WaitSync.doWait()
-
getWaiters
public int getWaiters()
-
-