public class JdbcDataSource extends Object implements DataSource
DataSource implementation for Google Cloud Spanner.| Constructor and Description |
|---|
JdbcDataSource() |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
getAutocommit() |
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
String |
getCredentials() |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
Boolean |
getReadonly() |
Boolean |
getRetryAbortsInternally() |
String |
getUrl() |
boolean |
isClosed()
Should return true if this object has been closed
|
boolean |
isWrapperFor(Class<?> iface) |
void |
setAutocommit(Boolean autocommit) |
void |
setCredentials(String credentials) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
void |
setReadonly(Boolean readonly) |
void |
setRetryAbortsInternally(Boolean retryAbortsInternally) |
void |
setUrl(String url) |
<T> T |
unwrap(Class<T> iface) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisWrapperFor, unwrappublic PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic boolean isClosed()
throws SQLException
SQLExceptionpublic String getUrl()
DataSource.public void setUrl(String url)
url - The JDBC URL to use for this DataSource.public String getCredentials()
DataSource. If a credentials URL is
specified in both the connection URL and using this property, the value in the connection
URL will be used.public void setCredentials(String credentials)
credentials - The credentials URL to use for this DataSource. If a credentials URL
is specified in both the connection URL and using this property, the value in the
connection URL will be used.public Boolean getAutocommit()
DataSource. If autocommit is
specified in both the connection URL and using this property, the value in the connection
URL will be used.public void setAutocommit(Boolean autocommit)
autocommit - The initial autocommit setting to use for this DataSource. If
autocommit is specified in both the connection URL and using this property, the value in
the connection URL will be used.public Boolean getReadonly()
DataSource. If readonly is
specified in both the connection URL and using this property, the value in the connection
URL will be used.public void setReadonly(Boolean readonly)
readonly - The initial readonly setting to use for this DataSource. If readonly is
specified in both the connection URL and using this property, the value in the connection
URL will be used.public Boolean getRetryAbortsInternally()
DataSource. If
retryAbortsInternally is specified in both the connection URL and using this property, the
value in the connection URL will be used.public void setRetryAbortsInternally(Boolean retryAbortsInternally)
retryAbortsInternally - The initial retryAbortsInternally setting to use for this DataSource. If retryAbortsInternally is specified in both the connection URL and using
this property, the value in the connection URL will be used.public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionCopyright © 2019 Google LLC. All rights reserved.