com.kuka.common.concurrent
Interface IWaitToken

All Known Implementing Classes:
CountDownLatchWaitToken

public interface IWaitToken

Interface providing methods to wait for and query a finished state.

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.

Method Summary
 void await()
          Blocks the calling thread until the state becomes finished.
 void await(long timeout, TimeUnit unit)
          Blocks the calling thread until the state becomes finished or the timeout elapses.
 boolean isFinished()
          Checks if the state is already finished.
 

Method Detail

await

void await()
Blocks the calling thread until the state becomes finished.

Throws:
ThreadInterruptedException - if the thread was interrupted while waiting

await

void await(long timeout,
           TimeUnit unit)
           throws TimeoutException
Blocks the calling thread until the state becomes finished or the timeout elapses.

Parameters:
timeout - The timeout.
unit - The unit of the timeout.
Throws:
ThreadInterruptedException - if the thread was interrupted while waiting
TimeoutException - the wait timed out

isFinished

boolean isFinished()
Checks if the state is already finished.

Returns:
true if finished, otherwise false.


Copyright © 2019. All rights reserved.