org.opencms.util
Class CmsWaitHandle

java.lang.Object
  extended by org.opencms.util.CmsWaitHandle

public class CmsWaitHandle
extends java.lang.Object

Low-level utility class used for waiting for an action performed by another thread.

This is really a thin wrapper around the wait() and notifyAll() methods.


Constructor Summary
CmsWaitHandle()
           
 
Method Summary
 void enter(long waitTime)
          Waits for a maximum of waitTime, but returns if another thread calls release().
 void release()
          Releases all currently waiting threads.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsWaitHandle

public CmsWaitHandle()
Method Detail

enter

public void enter(long waitTime)
Waits for a maximum of waitTime, but returns if another thread calls release().

Parameters:
waitTime - the maximum wait time

release

public void release()
Releases all currently waiting threads.