code: private int getAndSetNetworkTimeout(final Connection connection, final long timeoutMs)
     {
        if (isNetworkTimeoutSupported != FALSE) {
           try {
              final int originalTimeout = connection.getNetworkTimeout();
              connection.setNetworkTimeout(netTimeoutExecutor, (int) timeoutMs);
              isNetworkTimeoutSupported = TRUE;
              return originalTimeout;
           }
           catch (Exception | AbstractMethodError e) {
              if (isNetworkTimeoutSupported == UNINITIALIZED) {
                 isNetworkTimeoutSupported = FALSE;
  
                 logger.info("{} - Driver does not support get/set network timeout for connections. ({})", poolName, e.getMessage());
                 if (validationTimeout < SECONDS.toMillis(1)) {
                    logger.warn("{} - A validationTimeout of less than 1 second cannot be honored on drivers without setNetworkTimeout() support.", poolName);
                 }
                 else if (validationTimeout % SECONDS.toMillis(1) != 0) {
                    logger.warn("{} - A validationTimeout with fractional second granularity cannot be honored on drivers without setNetworkTimeout() support.", poolName);
                 }
              }
           }
        }
  
        return 0;
     }
docs: Set the network timeout, if <code>isUseNetworkTimeout</code> is <code>true</code> and the
  driver supports it.  Return the pre-existing value of the network timeout.
  
  @param connection the connection to set the network timeout on
  @param timeoutMs the number of milliseconds before timeout
  @return the pre-existing network timeout value