com.kuka.common.concurrent
Class EventLatch

java.lang.Object
  extended by com.kuka.common.concurrent.EventLatch

public final class EventLatch
extends Object

A synchronization aid that works like a CountDownLatch set to an initial count of 1. Instead of wait methods this class has to be queried for a IWaitToken. This token can safely be published to other classes.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Constructor Summary
EventLatch()
           
 
Method Summary
 void fire()
          Sets the event, releasing all waiting threads.
 IWaitToken getWaitToken()
          Returns the IWaitToken for this event latch.
 boolean isFired()
          Returns true if the event was already fired.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventLatch

public EventLatch()
Method Detail

fire

public void fire()
Sets the event, releasing all waiting threads. If already set nothing happens.


getWaitToken

public IWaitToken getWaitToken()
Returns the IWaitToken for this event latch.

Returns:
the wait token

isFired

public boolean isFired()
Returns true if the event was already fired.

Returns:
true if the event was already fired


Copyright © 2019. All rights reserved.