|
I believe the Linux kernel TCP_USER_TIMEOUT socket option has not yet been implemented neither in OpenJDK JDK, nor in Oracle JDK (see ExtendedSocketOptions and JDK-8038145 Support for Socket option TCP_USER_TIMEOUT), and it is also not part of the Java SE API (see StandardSocketOptions).
Netty implemented this option in its Linux-specific epoll transport implementation (uses OS API directly), which exists in addition to a deprecated OIO and modern NIO transport implementations (these are based on the JDK implementations), and macOS-specific kqueue transport implementation (unfortunately, Apple stopped hosting its man pages long ago, so there is no up-to-date documentation).
Given that the Java driver uses either NIO directly or uses a Netty transport chosen by a user via NettyStreamFactoryFactory.Builder.eventLoopGroup and NettyStreamFactoryFactory.Builder.socketChannelClass, the only way to support TCP_USER_TIMEOUT for us is to specify EpollChannelOption.TCP_USER_TIMEOUT iff a user instructed us to use EpollSocketChannel.
|