| java.lang.Object org.jasig.portal.utils.SetCheckInSemaphore
SetCheckInSemaphore | public class SetCheckInSemaphore (Code) | | This is a weird semaphore that makes every thread wait, until
all of Strings from a given set have been "checked in".
author: Peter Kharchenko pkharchenko@interactivebusiness.com" version: $Revision: 36690 $ |
Method Summary | |
public synchronized void | checkIn(Object key) Check in a key, but do not wait on the semaphore. | public synchronized void | checkInAll() Checks in all the remaining values, so that all
threads can proceed immediately. | public synchronized void | checkInAndWaitOn(Object key) Checks in with a given name, and waits for others. | public synchronized void | waitOn() Wait on the semaphore, without checking in any keys. |
SetCheckInSemaphore | public SetCheckInSemaphore(Set registrySet)(Code) | | Creates a new CountDownSemaphore instance.
Parameters: registrySet - a Set of key objectsthat will have to be "checked in" before any waiting threads are allowed to proceed. |
checkIn | public synchronized void checkIn(Object key)(Code) | | Check in a key, but do not wait on the semaphore.
Parameters: key - an Object value |
checkInAll | public synchronized void checkInAll()(Code) | | Checks in all the remaining values, so that all
threads can proceed immediately.
|
checkInAndWaitOn | public synchronized void checkInAndWaitOn(Object key)(Code) | | Checks in with a given name, and waits for others.
Parameters: key - an Object value |
waitOn | public synchronized void waitOn()(Code) | | Wait on the semaphore, without checking in any keys.
|
|
|