adding rsockets support into JDK

Chris Hegarty chris.hegarty at oracle.com
Wed Jan 30 15:02:01 UTC 2019


I've taken into account both Brian and Alan's comments. The class-level
description now reads as follows:

/**
 * Factory methods for creating RDMA-based TCP sockets and socket channels.
 *
 * <p>The {@link #openSocket(ProtocolFamily) openSocket} and {@link
 * #openServerSocket(ProtocolFamily) openServerSocket} methods create RDMA-based
 * TCP sockets.
 *
 * <p>The {@link #openSelector() openSelector}, {@link
 * #openSocketChannel(ProtocolFamily) openSocketChannel}, and {@link
 * #openServerSocketChannel(ProtocolFamily) openServerSocketChannel} methods
 * create selectors and selectable channels for use with RDMA sockets. These
 * selectors and channels are created by the RDMA selector provider, which is
 * not the {@linkplain SelectorProvider#provider() default} system-wide selector
 * provider. Consequently, selectable channels to RDMA sockets may not be
 * multiplexed with selectable channels created by the default system-wide
 * selector provider. The RDMA selector provider does not support datagram
 * channels or pipes. Its {@link SelectorProvider#openDatagramChannel
 * openDatagramChannel} and {@link SelectorProvider#openPipe openPipe} methods
 * throw {@link UnsupportedOperationException UnsupportedOperationException}.
 *
 * @implNote The RDMA selector provider supports socket channels of type
 * {@link StandardProtocolFamily#INET INET} and {@link
 * StandardProtocolFamily#INET6 INET6}. Its {@link
 * SelectorProvider#openSocketChannel() openSocketChannel} and {@link
 * SelectorProvider#openServerSocketChannel() openServerSocketChannel}
 * methods create selectable channels with a family of {@link
 * StandardProtocolFamily#INET6 INET6}, if the underlying platform supports
 * IPv6. Otherwise, it creates selectable channels with a family of {@link
 * StandardProtocolFamily#INET INET}.
 *
 * @since 13
 */

 I pushed this to the sandbox [1], along with a test ( the test could be
 expanded a little to check the impl note, but that can be done as a
 follow-up ).

 -Chris.

[1] http://hg.openjdk.java.net/jdk/sandbox/rev/919516f93dcf

> On 29 Jan 2019, at 19:22, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> 
> 
>> On Jan 29, 2019, at 6:55 AM, Alan Bateman <Alan.Bateman at oracle.com <mailto:Alan.Bateman at oracle.com>> wrote:
>> 
>>> The part of the spec that talks about the SelectorProvider is still
>>> relevant, even though the provider is not directly accessible from the
>>> RdmaSockets class.
>>> 
>>> The SelectorProvider is indirectly accessible from a Selector or
>>> AbstractSelectableChannel, e.g.:
>>>   SelectorProvider sp = RdmaSockets.openSelector().provider();
>>>   SelectorProvider sp = RdmaSockets.openSocketChannel(INET).provider();
> 
> Ah, of course.
> 
>> Right, this is reason for the wording in the class description. I think I provided these sentences for the javadoc a few months ago.
> 
> By the same token, perhaps the first sentence of the RDMASockets class description should be changed from
> 
> "Factory methods for creating RDMA-based TCP sockets and channels.”
> 
> to
> 
> "Factory methods for creating RDMA-based TCP sockets and socket channels.”
> 
> Also, and this is being picky, the “Its” in "Its selector provider does not support datagram channels and pipes.” reads a little awkward to me. Maybe instead something like this?:
> 
> “The RDMA selector provider also does not support datagram channels and pipes. Its openDatagramChannel <file:///Users/bpb/Work/CoreLibs/jdk/sandbox/build/macosx-x86_64-server-release/images/docs/api/java.base/java/nio/channels/spi/SelectorProvider.html#openDatagramChannel()> and openPipe <file:///Users/bpb/Work/CoreLibs/jdk/sandbox/build/macosx-x86_64-server-release/images/docs/api/java.base/java/nio/channels/spi/SelectorProvider.html#openPipe()> methods throw UnsupportedOperationException <file:///Users/bpb/Work/CoreLibs/jdk/sandbox/build/macosx-x86_64-server-release/images/docs/api/java.base/java/lang/UnsupportedOperationException.html>.”
> 
> Brian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190130/f80a7d09/attachment.html>


More information about the nio-dev mailing list