The documentation seems to explain this terribly, but without looking at any code behind the class, I assume that you should pass an instance of Executor to the method so that implementations can spawn jobs / threads to check connection status.
Since the connection reading is blocked, to implement any timeout logic, it is necessary to have one more stream, besides reading, which can check the connection status.
It seems that a constructive decision was made that instead of a JDBC driver that implements internal logic, about how / when to spawn threads to handle this, the API wants you, as a client, to go through the Executor, which will be used to check timeouts. This way, you, as a client, can control such things as checking is often performed, not allowing it to create more threads in your container than you like, etc.
If you do not already have an instance of Executor, you can simply create it by default:
conn.setNetworkTimeout(Executors.newFixedThreadPool(numThreads), yourTimeout);
source share