Interface InterruptibleLimitedWait


public interface InterruptibleLimitedWait
Defines a generic interface to wait for an event to occur or return before the given timeout elapses. This interface was designed for the static CancelableWaits.await(CancellationToken, long, TimeUnit, InterruptibleLimitedWait) method. See its documentation for further reference.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    await(long nanosToWait)
    Waits until the implementation defined event occurs or the given timeout elapses.
  • Method Details

    • await

      boolean await(long nanosToWait) throws InterruptedException
      Waits until the implementation defined event occurs or the given timeout elapses. The static CancelableWaits.await(CancellationToken, long, TimeUnit, InterruptibleLimitedWait) method calls this method, see its documentation how it uses this method.
      Parameters:
      nanosToWait - the maximum time to wait in nanoseconds. This argument must be greater than or equal to zero.
      Returns:
      the return value is implementation specific but usually a false return value means that the given maximum time elapsed without the waited event occurring
      Throws:
      InterruptedException - thrown if the current thread was interrupted