adding rsockets support into JDK
Alan Bateman
Alan.Bateman at oracle.com
Tue Jan 29 14:55:46 UTC 2019
On 29/01/2019 14:20, Chris Hegarty wrote:
> Lucy, Brian, Alan
>
> 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();
Right, this is reason for the wording in the class description. I think
I provided these sentences for the javadoc a few months ago.
> :
>
> Alan,
> Are there any use-cases where channel creation *MUST* proceed through
> the SelectorProvider API? I wanna ensure that it is ok to effectively
> not support this type of channel creation, but direct developers to the
> factory methods.
It would be unusual but not wrong. In other words, if a reference to the
SelectorProvider is obtained then its openSocketChannel,
openServerSocketChannel, and openSelector methods should open a socket
channel, server socket channel or selector. The only awkward thing is
that we've converged on factory factories that specify the protocol
family so the no-arg methods defined by SelectorProvider will have to
choose. This is something for the javadoc, probably expanding on the
text that we have already. We could potentially introduce a system
property along the lines of java.net.preferIPv4Stack=true that would
force the RDMA SelectorProvider methods to use IPv4, we don't need that
initially but it might be useful to have.
-Alan
More information about the nio-dev
mailing list