Skip to content

Commit

Permalink
Revise #33024 (#33028)
Browse files Browse the repository at this point in the history
* Revise #33024

* Revise #33024
  • Loading branch information
terrymanu authored Sep 27, 2024
1 parent f00702e commit f8c6ad7
Showing 1 changed file with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,28 +265,22 @@ public void setReadOnly(final boolean readOnly) throws SQLException {
databaseConnectionManager.setReadOnly(readOnly);
}

/**
* This is just to avoid the Warning in <a href="https://github.com/brettwooldridge/HikariCP/issues/2196">brettwooldridge/HikariCP#2196</a>.
* ShardingSphere does not propagate this property to the real JDBC Driver.
* `0` is actually the default value of {@link java.net.Socket#getSoTimeout()}.
/*
* This is just to avoid the Warning in <a href="https://github.com/brettwooldridge/HikariCP/issues/2196">brettwooldridge/HikariCP#2196</a>. ShardingSphere does not propagate this property to the
* real JDBC Driver. `0` is actually the default value of {@link java.net.Socket#getSoTimeout()}.
*/
@Override
public int getNetworkTimeout() {
return 0;
}

/**
* This is just to avoid the Warning in <a href="https://github.com/brettwooldridge/HikariCP/issues/2196">brettwooldridge/HikariCP#2196</a>.
* ShardingSphere does not propagate this property to the real JDBC Driver.
*
* @param executor Not used.
* @param milliseconds The time in milliseconds to wait for the database operation to complete.
/*
* This is just to avoid the Warning in <a href="https://github.com/brettwooldridge/HikariCP/issues/2196">brettwooldridge/HikariCP#2196</a>. ShardingSphere does not propagate this property to the
* real JDBC Driver.
*/
@Override
public void setNetworkTimeout(final Executor executor, final int milliseconds) throws SQLException {
if (0 > milliseconds) {
throw new SQLException("Network timeout must be a value greater than or equal to 0.");
}
ShardingSpherePreconditions.checkState(0 <= milliseconds, () -> new SQLException("Network timeout must be a value greater than or equal to 0."));
}

@Override
Expand Down

0 comments on commit f8c6ad7

Please sign in to comment.