@Beta public final class PooledDataSource extends Object implements DataSource, AutoCloseable
| Constructor and Description |
|---|
PooledDataSource(int initialSize,
int maxSize,
RecyclingSupplier.Factory<Connection> jdbcConnectionFactory) |
PooledDataSource(int initialSize,
int maxSize,
String driverName,
String url,
Properties properties,
int loginTimeoutSeconds) |
PooledDataSource(int initialSize,
int maxSize,
String driverName,
String url,
String user,
String password) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
String |
toString() |
<T> T |
unwrap(Class<T> iface) |
public PooledDataSource(int initialSize,
int maxSize,
String driverName,
String url,
String user,
String password)
throws ObjectCreationException
ObjectCreationExceptionpublic PooledDataSource(int initialSize,
int maxSize,
String driverName,
String url,
Properties properties,
int loginTimeoutSeconds)
throws ObjectCreationException
ObjectCreationExceptionpublic PooledDataSource(int initialSize,
int maxSize,
RecyclingSupplier.Factory<Connection> jdbcConnectionFactory)
throws ObjectCreationException
ObjectCreationExceptionpublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLFeatureNotSupportedException
getConnection in interface DataSourceSQLFeatureNotSupportedExceptionpublic PrintWriter getLogWriter() throws SQLFeatureNotSupportedException
getLogWriter in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic void setLogWriter(PrintWriter out) throws SQLFeatureNotSupportedException
setLogWriter in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic void setLoginTimeout(int seconds)
throws SQLFeatureNotSupportedException
setLoginTimeout in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic int getLoginTimeout()
throws SQLFeatureNotSupportedException
getLoginTimeout in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface)
isWrapperFor in interface Wrapperpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic void close()
throws ObjectDisposeException,
InterruptedException
close in interface AutoCloseableObjectDisposeExceptionInterruptedExceptionCopyright © 2018 SPF4J. All rights reserved.