8.3.40 setNetworkTimeout(Executor executor, int milliseconds)
- Organization of this subsection
(1) Function
This method sets the timeout time set for SQL processing executed through this Connection object.
(2) Format
public synchronized void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
(3) Arguments
- Executor executor
-
This argument is ignored, if specified.
- int milliseconds
-
Specifies the timeout time for SQL processing in milliseconds.
If 0 is specified or this method is not executed, the value set for adb_clt_rpc_sql_wait_time in the system properties, user properties, or connection URL properties becomes effective.
In addition, the specified value is divided by 1,000 and truncated to an integer to be regarded as the timeout time in seconds. Therefore, if a value less than 1,000 milliseconds is specified, it is treated as 0. If a value of 65,536,000 milliseconds (65,536 seconds) or more is specified, the specified value of this method is ignored.
(4) Return value
None.
(5) Exceptions
The JDBC driver throws an SQLException in the following cases:
-
The Connection object is closed.
-
A value less than 0 is specified for milliseconds.