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 DataSource
SQLException
public Connection getConnection(String username, String password) throws SQLException
getConnection
in interface DataSource
SQLException
public void setLoginTimeout(int loginTimeout) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
public void setLogWriter(PrintWriter logWriter) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
public 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
SQLException
protected 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 Wrapper
SQLException
public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
public Logger getParentLogger()
getParentLogger
in interface CommonDataSource
Copyright © 2010–2015 MyBatis.org. All rights reserved.