com.kuka.nav
Interface AsyncState


public interface AsyncState

A mutable boolean that can be waited on for asynchronous value changes.


Method Summary
 void await(boolean value)
          Blocks the calling thread until the state of the boolean equals the given value.
 void await(boolean value, long timeout, TimeUnit unit)
          Blocks the calling thread until the state of the boolean equals the given value.
 boolean value()
           
 

Method Detail

value

boolean value()
Returns:
The current state of the mutable boolean.

await

void await(boolean value)
           throws InterruptedException
Blocks the calling thread until the state of the boolean equals the given value. Note that by the time the thread returns, the mutable boolean may have already changed again but it is guaranteed that the boolean was at least once equalling the given value during the wait.

Parameters:
value - The value the boolean should have for the wait to end.
Throws:
InterruptedException - When the thread is interrupted.

await

void await(boolean value,
           long timeout,
           TimeUnit unit)
           throws InterruptedException,
                  TimeoutException
Blocks the calling thread until the state of the boolean equals the given value.

By the time the thread returns, the mutable boolean may have already changed again but it is guaranteed that the boolean was at least once equal the given value during the wait.

Parameters:
value - The value of the state to wait for.
timeout - The maximum time to wait.
unit - The time unit for the timeout.
Throws:
InterruptedException - When the thread is interrupted.
TimeoutException - When the timeout elapses.


Copyright © 2019. All rights reserved.