Change the default implementation of the
java.nio.channels.Selector API on Microsoft Windows to a new implementation that is significantly more scalable than the existing implementation.
The default implementation of the Selector API on Microsoft Windows is based on the Windows Sockets "select" function. The implementation has existed since JDK 1.4 and scales horribly, partly because select is O(N) on the number of sockets to poll, partly because select is limited to 1024 sockets and so requires a pool of threads when there are thousands of selectable channels registered with a Selector.
Change the default implementation to a new "wepoll" based Selector. wepoll is a library that provides a scalable polling interface to the Ancillary Function Driver for Winsock. It scales on the number of sockets that are ready for I/O rather than the number of sockets that are polled.
Keep the old implementation, unchanged. The JDK can be configured to use the old implementation by running with the system property "
java.nio.channel.spi.SelectorProvider" (specified in the API docs for SelectorProvider) set to the value of "
A release note is planned to create awareness of the new implementation and to document how to switch back to the old implementation. We have not observed any behavioral or compatibility differences in testing to date.
There are no specification changes, this is an implementation-only change.