uPortal 2.4.1
API Documentation

org.jasig.portal.utils
Class SetCheckInSemaphore

java.lang.Object
  extended byorg.jasig.portal.utils.SetCheckInSemaphore

public class SetCheckInSemaphore
extends java.lang.Object

This is a weird semaphore that makes every thread wait, until all of Strings from a given set have been "checked in".

Version:
$Revision: 1.1 $
Author:
Peter Kharchenko

Constructor Summary
SetCheckInSemaphore(java.util.Set registrySet)
          Creates a new CountDownSemaphore instance.
 
Method Summary
 void checkIn(java.lang.Object key)
          Check in a key, but do not wait on the semaphore.
 void checkInAll()
          Checks in all the remaining values, so that all threads can proceed immediately.
 void checkInAndWaitOn(java.lang.Object key)
          Checks in with a given name, and waits for others.
 void waitOn()
          Wait on the semaphore, without checking in any keys.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetCheckInSemaphore

public SetCheckInSemaphore(java.util.Set registrySet)
Creates a new CountDownSemaphore instance.

Parameters:
registrySet - a Set of key objects that will have to be "checked in" before any waiting threads are allowed to proceed.
Method Detail

checkInAndWaitOn

public void checkInAndWaitOn(java.lang.Object key)
Checks in with a given name, and waits for others.

Parameters:
key - an Object value

checkIn

public void checkIn(java.lang.Object key)
Check in a key, but do not wait on the semaphore.

Parameters:
key - an Object value

waitOn

public void waitOn()
Wait on the semaphore, without checking in any keys.


checkInAll

public void checkInAll()
Checks in all the remaining values, so that all threads can proceed immediately.


uPortal 2.4.1
API Documentation