public class PooledDataSource extends Object implements DataSource
| Modifier and Type | Field and Description |
|---|---|
protected int |
poolMaximumActiveConnections |
protected int |
poolMaximumCheckoutTime |
protected int |
poolMaximumIdleConnections |
protected int |
poolPingConnectionsNotUsedFor |
protected boolean |
poolPingEnabled |
protected String |
poolPingQuery |
protected int |
poolTimeToWait |
| Constructor and Description |
|---|
PooledDataSource() |
PooledDataSource(ClassLoader driverClassLoader,
String driver,
String url,
Properties driverProperties) |
PooledDataSource(ClassLoader driverClassLoader,
String driver,
String url,
String username,
String password) |
PooledDataSource(String driver,
String url,
Properties driverProperties) |
PooledDataSource(String driver,
String url,
String username,
String password) |
PooledDataSource(UnpooledDataSource dataSource) |
protected int poolMaximumActiveConnections
protected int poolMaximumIdleConnections
protected int poolMaximumCheckoutTime
protected int poolTimeToWait
protected String poolPingQuery
protected boolean poolPingEnabled
protected int poolPingConnectionsNotUsedFor
public PooledDataSource()
public PooledDataSource(UnpooledDataSource dataSource)
public PooledDataSource(String driver, String url, String username, String password)
public PooledDataSource(String driver, String url, Properties driverProperties)
public PooledDataSource(ClassLoader driverClassLoader, String driver, String url, String username, String password)
public PooledDataSource(ClassLoader driverClassLoader, String driver, String url, Properties driverProperties)
public Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic void setLoginTimeout(int loginTimeout)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter logWriter) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setDriver(String driver)
public void setUrl(String url)
public void setUsername(String username)
public void setPassword(String password)
public void setDefaultAutoCommit(boolean defaultAutoCommit)
public void setDefaultTransactionIsolationLevel(Integer defaultTransactionIsolationLevel)
public void setDriverProperties(Properties driverProps)
public void setPoolMaximumActiveConnections(int poolMaximumActiveConnections)
public void setPoolMaximumIdleConnections(int poolMaximumIdleConnections)
public void setPoolMaximumCheckoutTime(int poolMaximumCheckoutTime)
public void setPoolTimeToWait(int poolTimeToWait)
public void setPoolPingQuery(String poolPingQuery)
public void setPoolPingEnabled(boolean poolPingEnabled)
public void setPoolPingConnectionsNotUsedFor(int milliseconds)
public String getDriver()
public String getUrl()
public String getUsername()
public String getPassword()
public boolean isAutoCommit()
public Integer getDefaultTransactionIsolationLevel()
public Properties getDriverProperties()
public int getPoolMaximumActiveConnections()
public int getPoolMaximumIdleConnections()
public int getPoolMaximumCheckoutTime()
public int getPoolTimeToWait()
public String getPoolPingQuery()
public boolean isPoolPingEnabled()
public int getPoolPingConnectionsNotUsedFor()
public void forceCloseAll()
public PoolState getPoolState()
protected void pushConnection(org.apache.ibatis.datasource.pooled.PooledConnection conn)
throws SQLException
SQLExceptionprotected boolean pingConnection(org.apache.ibatis.datasource.pooled.PooledConnection conn)
public static Connection unwrapConnection(Connection conn)
protected void finalize()
throws Throwable
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic Logger getParentLogger()
getParentLogger in interface CommonDataSourceCopyright © 2010–2015 MyBatis.org. All rights reserved.