public class JdbcDataSource extends AbstractJdbcWrapper implements DataSource
DataSource implementation for Google Cloud Spanner.
Inheritance
java.lang.Object >
com.google.cloud.spanner.jdbc.AbstractJdbcWrapper >
JdbcDataSource
Inherited Members
com.google.cloud.spanner.jdbc.AbstractJdbcWrapper.<T>unwrap(java.lang.Class<T>)
com.google.cloud.spanner.jdbc.AbstractJdbcWrapper.isClosed()
com.google.cloud.spanner.jdbc.AbstractJdbcWrapper.isWrapperFor(java.lang.Class<?>)
Constructors
JdbcDataSource()
Methods
getAutocommit()
public Boolean getAutocommit()
Returns |
---|
Type | Description |
Boolean | 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.
|
getConnection()
public Connection getConnection()
getConnection(String username, String password)
public Connection getConnection(String username, String password)
getCredentials()
public String getCredentials()
Returns |
---|
Type | Description |
String | 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.
|
getLogWriter()
public PrintWriter getLogWriter()
getLoginTimeout()
public int getLoginTimeout()
Returns |
---|
Type | Description |
int | |
getParentLogger()
public Logger getParentLogger()
getReadonly()
public Boolean getReadonly()
Returns |
---|
Type | Description |
Boolean | 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.
|
getRetryAbortsInternally()
public Boolean getRetryAbortsInternally()
Returns |
---|
Type | Description |
Boolean | 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.
|
getUrl()
isClosed()
public boolean isClosed()
Should return true if this object has been closed
Overrides
com.google.cloud.spanner.jdbc.AbstractJdbcWrapper.isClosed()
setAutocommit(Boolean autocommit)
public void setAutocommit(Boolean autocommit)
Parameter |
---|
Name | Description |
autocommit | Boolean
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.
|
setCredentials(String credentials)
public void setCredentials(String credentials)
Parameter |
---|
Name | Description |
credentials | String
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.
|
setLogWriter(PrintWriter out)
public void setLogWriter(PrintWriter out)
setLoginTimeout(int seconds)
public void setLoginTimeout(int seconds)
Parameter |
---|
Name | Description |
seconds | int
|
setReadonly(Boolean readonly)
public void setReadonly(Boolean readonly)
Parameter |
---|
Name | Description |
readonly | Boolean
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.
|
setRetryAbortsInternally(Boolean retryAbortsInternally)
public void setRetryAbortsInternally(Boolean retryAbortsInternally)
Parameter |
---|
Name | Description |
retryAbortsInternally | Boolean
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.
|
setUrl(String url)
public void setUrl(String url)