Cancels the registration with the watch service. Upon return the watch key will be invalid. If the watch key is enqueued, waiting to be retrieved from the watch service, then it will remain in the queue until it is removed. Pending events, if any, remain pending and may be retrieved by invoking the {@link #pollEvents pollEvents} method after the key iscancelled.
If this watch key has already been cancelled then invoking this method has no effect. Once cancelled, a watch key remains forever invalid.