Retrieves and removes the next watch key, waiting if necessary up to the specified wait time if none are yet present.
timeout
| how to wait before giving up, in units of unit | |
unit
| a TimeUnit determining how to interpret the timeout
parameter |
null
ClosedWatchServiceException
| if this watch service is closed, or it is closed while waiting for the next key | |
InterruptedException
| if interrupted while waiting |
Diagram: Watch