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.-
Method Summary
Modifier and TypeMethodDescriptionbooleanawait(long nanosToWait) Waits until the implementation defined event occurs or the given timeout elapses.
-
Method Details
-
await
Waits until the implementation defined event occurs or the given timeout elapses. The staticCancelableWaits.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
falsereturn value means that the given maximum time elapsed without the waited event occurring - Throws:
InterruptedException- thrown if the current thread was interrupted
-