Performs an effect with each selected key.
Performs an effect with each selected key.
If the result of effect is true, the key will be removed from the selected-key set, which is usually what you want after successfully handling a selected key.
Can throw IOException and ClosedSelectorException.
Can throw IOException and ClosedSelectorException.
Can throw IOException and ClosedSelectorException.
Returns this selector's selected-key set.
Returns this selector's selected-key set.
Note that the returned set it mutable - keys may be removed from, but not directly added to it.
Any attempt to add an object to the key set will cause an UnsupportedOperationException
to be thrown.
The selected-key set is not thread-safe.