public class UnmanagedPoolingDataSource extends Object implements PoolingDataSource
DataSource with a pool of connections.| Modifier and Type | Class and Description |
|---|---|
static class |
UnmanagedPoolingDataSource.ConnectionUnavailableException
An exception indicating that a connection request waiting in the queue
timed out and was unable to obtain a connection.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_QUEUE_WAIT_DEFAULT
Defines a maximum time in milliseconds that a connection request could
wait in the connection queue.
|
| Constructor and Description |
|---|
UnmanagedPoolingDataSource(DataSource nonPoolingDataSource,
PoolingDataSourceParameters parameters) |
| 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) |
<T> T |
unwrap(Class<T> iface) |
public static final int MAX_QUEUE_WAIT_DEFAULT
public UnmanagedPoolingDataSource(DataSource nonPoolingDataSource, PoolingDataSourceParameters parameters)
public void close()
close in interface AutoCloseablepublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String userName, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionCopyright © 2001–2023 Apache Cayenne. All rights reserved.