Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.utils
Class SetCheckInSemaphore

    java.lang.Object
      org.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.2 $
Author:
  Peter Kharchenko

Field Summary
`private java.util.Set` | `registry`

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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### registry

    private java.util.Set registry

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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD