com.sun.jts.CosTransactions
Class EventSemaphore

java.lang.Object
  extended by com.sun.jts.CosTransactions.EventSemaphore

public class EventSemaphore
extends java.lang.Object

The EventSemaphore interface provides operations that wait for and post an event semaphore.

This is specifically to handle the situation where the event may have been posted before the wait method is called. This behaviour is not supported by the existing wait and notify methods.

Version:
0.01
Author:
Simon Holdsworth, IBM Corporation
See Also:

Method Summary
 boolean isPosted()
           
 void waitEvent()
          Waits for the event to be posted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isPosted

public boolean isPosted()
Returns:
true if semaphore has already been posted.

waitEvent

public void waitEvent()
               throws java.lang.InterruptedException
Waits for the event to be posted.

If the event has already been posted, then the operation returns immediately.

Parameters:
-
Throws:
java.lang.InterruptedException - The wait was interrupted.
See Also:


Copyright © 2012 GlassFish Community. All Rights Reserved.