Channelspublic static interface Channels.SelectableChannelCloser
readWriteSelectableChannel.| Modifier and Type | Method | Description | 
|---|---|---|
| void | implCloseChannel | Closes a selectable channel. | 
| void | implReleaseChannel | Release the file descriptor and any resources for a selectable channel that closed while registered with one or more  Selectors. | 
void implCloseChannel(SelectableChannel sc) throws IOException
This method is invoked by the channel's close method in order to perform the actual work of closing the channel. This method is only invoked if the channel has not yet been closed, and it is never invoked more than once by the channel's close implementation.
 An implementation of this method must arrange for any other thread that is blocked in an I/O operation upon the channel to return immediately, either by throwing an exception or by returning normally. If the channel is registered with one or more Selectors then the file descriptor should not be released until the implReleaseChannel method is invoked. 
sc - The selectable channelIOException - If an I/O error occurs while closing the file descriptorvoid implReleaseChannel(SelectableChannel sc) throws IOException
Selectors.  This method is for cases where a channel is closed when registered with one or more Selectors. A channel may remain registered for some time after it is closed. This method is invoked when the channel is eventually deregistered from the last Selector that it was registered with. It is invoked at most once.
sc - The closed selectable channelIOException - If an I/O error occurs
    © 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
    https://docs.oracle.com/en/java/javase/21/docs/api/jdk.net/jdk/nio/Channels.SelectableChannelCloser.html