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 AutoCloseable
public Connection getConnection() throws SQLException
getConnection
in interface DataSource
SQLException
public Connection getConnection(String userName, String password) throws SQLException
getConnection
in interface DataSource
SQLException
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface Wrapper
SQLException
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
Copyright © 2001–2018 Apache Cayenne. All rights reserved.