Closes this selector.
If a thread is currently blocked in one of this
selector’s selection methods then it is interrupted as if by invoking
the selector’s wakeup method.
Any uncancelled keys still associated with this selector are
invalidated, their channels are deregistered, and any other resources
associated with this selector are released.
If this selector is already closed then invoking this method has no
effect.
After a selector is closed, any further attempt to use it, except by
invoking this method or the wakeup method, will cause a
ClosedSelectorException to be thrown.