Package com.alibaba.druid.pool
Class DruidDataSourceC3P0Adapter
- java.lang.Object
-
- com.alibaba.druid.pool.DruidDataSourceC3P0Adapter
-
- All Implemented Interfaces:
DruidDataSourceC3P0AdapterMBean,Wrapper,CommonDataSource,DataSource
public class DruidDataSourceC3P0Adapter extends Object implements DataSource, DruidDataSourceC3P0AdapterMBean
-
-
Constructor Summary
Constructors Constructor Description DruidDataSourceC3P0Adapter()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
Methods inherited from interface com.alibaba.druid.pool.DruidDataSourceC3P0AdapterMBean
toString
-
-
-
-
Method Detail
-
getLogWriter
public PrintWriter getLogWriter() throws SQLException
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
setLogWriter
public void setLogWriter(PrintWriter out) throws SQLException
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
public void setLoginTimeout(int seconds) throws SQLException- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getLoginTimeout
public int getLoginTimeout() throws SQLException- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getConnection
public Connection getConnection() throws SQLException
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
public Connection getConnection(String username, String password) throws SQLException
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getDriverClass
public String getDriverClass()
- Specified by:
getDriverClassin interfaceDruidDataSourceC3P0AdapterMBean
-
setDriverClass
public void setDriverClass(String driverClass)
-
getJdbcUrl
public String getJdbcUrl()
- Specified by:
getJdbcUrlin interfaceDruidDataSourceC3P0AdapterMBean
-
getDriver
public Driver getDriver()
-
setDriver
public void setDriver(Driver driver)
-
setJdbcUrl
public void setJdbcUrl(String jdbcUrl)
-
getProperties
public Properties getProperties()
- Specified by:
getPropertiesin interfaceDruidDataSourceC3P0AdapterMBean
-
setProperties
public void setProperties(Properties properties)
-
getUser
public String getUser()
- Specified by:
getUserin interfaceDruidDataSourceC3P0AdapterMBean
-
setUser
public void setUser(String user)
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String password)
-
getCheckoutTimeout
public int getCheckoutTimeout()
- Specified by:
getCheckoutTimeoutin interfaceDruidDataSourceC3P0AdapterMBean
-
setCheckoutTimeout
public void setCheckoutTimeout(int checkoutTimeout)
-
isAutoCommitOnClose
public boolean isAutoCommitOnClose()
- Specified by:
isAutoCommitOnClosein interfaceDruidDataSourceC3P0AdapterMBean
-
setAutoCommitOnClose
public void setAutoCommitOnClose(boolean autoCommitOnClose)
-
getIdleConnectionTestPeriod
public int getIdleConnectionTestPeriod()
- Specified by:
getIdleConnectionTestPeriodin interfaceDruidDataSourceC3P0AdapterMBean
-
setIdleConnectionTestPeriod
public void setIdleConnectionTestPeriod(int idleConnectionTestPeriod)
-
getInitialPoolSize
public int getInitialPoolSize()
- Specified by:
getInitialPoolSizein interfaceDruidDataSourceC3P0AdapterMBean
-
setInitialPoolSize
public void setInitialPoolSize(int initialPoolSize)
-
getMaxIdleTime
public int getMaxIdleTime()
- Specified by:
getMaxIdleTimein interfaceDruidDataSourceC3P0AdapterMBean
-
setMaxIdleTime
public void setMaxIdleTime(int maxIdleTime)
-
getMaxPoolSize
public int getMaxPoolSize()
- Specified by:
getMaxPoolSizein interfaceDruidDataSourceC3P0AdapterMBean
-
setMaxPoolSize
public void setMaxPoolSize(int maxPoolSize)
-
getMinPoolSize
public int getMinPoolSize()
- Specified by:
getMinPoolSizein interfaceDruidDataSourceC3P0AdapterMBean
-
setMinPoolSize
public void setMinPoolSize(int minPoolSize)
-
isTestConnectionOnCheckout
public boolean isTestConnectionOnCheckout()
- Specified by:
isTestConnectionOnCheckoutin interfaceDruidDataSourceC3P0AdapterMBean
-
setTestConnectionOnCheckout
public void setTestConnectionOnCheckout(boolean testConnectionOnCheckout)
-
isTestConnectionOnCheckin
public boolean isTestConnectionOnCheckin()
- Specified by:
isTestConnectionOnCheckinin interfaceDruidDataSourceC3P0AdapterMBean
-
setTestConnectionOnCheckin
public void setTestConnectionOnCheckin(boolean testConnectionOnCheckin)
-
getPreferredTestQuery
public String getPreferredTestQuery()
- Specified by:
getPreferredTestQueryin interfaceDruidDataSourceC3P0AdapterMBean
-
setPreferredTestQuery
public void setPreferredTestQuery(String preferredTestQuery)
-
setFilters
public void setFilters(String filters) throws SQLException
- Throws:
SQLException
-
getDataSourceName
public String getDataSourceName()
- Specified by:
getDataSourceNamein interfaceDruidDataSourceC3P0AdapterMBean
-
getNumConnections
public int getNumConnections()
- Specified by:
getNumConnectionsin interfaceDruidDataSourceC3P0AdapterMBean
-
getNumIdleConnections
public int getNumIdleConnections()
- Specified by:
getNumIdleConnectionsin interfaceDruidDataSourceC3P0AdapterMBean
-
getNumBusyConnections
public int getNumBusyConnections()
- Specified by:
getNumBusyConnectionsin interfaceDruidDataSourceC3P0AdapterMBean
-
getNumUnclosedOrphanedConnections
public int getNumUnclosedOrphanedConnections()
-
getNumConnectionsDefaultUser
public int getNumConnectionsDefaultUser()
-
getNumIdleConnectionsDefaultUser
public int getNumIdleConnectionsDefaultUser()
-
getNumBusyConnectionsDefaultUser
public int getNumBusyConnectionsDefaultUser()
-
getMaxStatementsPerConnection
public int getMaxStatementsPerConnection()
-
setMaxStatementsPerConnection
public void setMaxStatementsPerConnection(int maxStatementsPerConnection)
-
getMaxStatements
public int getMaxStatements()
-
setMaxStatements
public void setMaxStatements(int maxStatements)
-
getUnreturnedConnectionTimeout
public int getUnreturnedConnectionTimeout()
-
setUnreturnedConnectionTimeout
public void setUnreturnedConnectionTimeout(int unreturnedConnectionTimeout)
-
isDebugUnreturnedConnectionStackTraces
public boolean isDebugUnreturnedConnectionStackTraces()
-
setDebugUnreturnedConnectionStackTraces
public void setDebugUnreturnedConnectionStackTraces(boolean debugUnreturnedConnectionStackTraces)
-
getAcquireRetryAttempts
public int getAcquireRetryAttempts()
-
setAcquireRetryAttempts
public void setAcquireRetryAttempts(int acquireRetryAttempts)
-
getAcquireRetryDelay
public int getAcquireRetryDelay()
-
setAcquireRetryDelay
public void setAcquireRetryDelay(int acquireRetryDelay)
-
isBreakAfterAcquireFailure
public boolean isBreakAfterAcquireFailure()
-
setBreakAfterAcquireFailure
public void setBreakAfterAcquireFailure(boolean breakAfterAcquireFailure)
-
isEnable
public boolean isEnable()
- Specified by:
isEnablein interfaceDruidDataSourceC3P0AdapterMBean
-
shrink
public void shrink()
- Specified by:
shrinkin interfaceDruidDataSourceC3P0AdapterMBean
-
getWaitThreadCount
public int getWaitThreadCount()
- Specified by:
getWaitThreadCountin interfaceDruidDataSourceC3P0AdapterMBean
-
getLockQueueLength
public int getLockQueueLength()
- Specified by:
getLockQueueLengthin interfaceDruidDataSourceC3P0AdapterMBean
-
close
public void close()
- Specified by:
closein interfaceDruidDataSourceC3P0AdapterMBean
-
getConnectionTesterClassName
public String getConnectionTesterClassName()
-
setConnectionTesterClassName
public void setConnectionTesterClassName(String connectionTesterClassName)
-
getAutomaticTestTable
public String getAutomaticTestTable()
-
setAutomaticTestTable
public void setAutomaticTestTable(String automaticTestTable)
-
isForceIgnoreUnresolvedTransactions
public boolean isForceIgnoreUnresolvedTransactions()
-
setForceIgnoreUnresolvedTransactions
public void setForceIgnoreUnresolvedTransactions(boolean forceIgnoreUnresolvedTransactions)
-
isUsesTraditionalReflectiveProxies
public boolean isUsesTraditionalReflectiveProxies()
-
setUsesTraditionalReflectiveProxies
public void setUsesTraditionalReflectiveProxies(boolean usesTraditionalReflectiveProxies)
-
getUserOverridesAsString
public String getUserOverridesAsString()
-
setUserOverridesAsString
public void setUserOverridesAsString(String userOverridesAsString)
-
getMaxAdministrativeTaskTime
public int getMaxAdministrativeTaskTime()
-
setMaxAdministrativeTaskTime
public void setMaxAdministrativeTaskTime(int maxAdministrativeTaskTime)
-
getMaxIdleTimeExcessConnections
public int getMaxIdleTimeExcessConnections()
-
setMaxIdleTimeExcessConnections
public void setMaxIdleTimeExcessConnections(int maxIdleTimeExcessConnections)
-
getMaxConnectionAge
public int getMaxConnectionAge()
-
setMaxConnectionAge
public void setMaxConnectionAge(int maxConnectionAge)
-
getConnectionCustomizerClassName
public String getConnectionCustomizerClassName()
-
setConnectionCustomizerClassName
public void setConnectionCustomizerClassName(String connectionCustomizerClassName)
-
getFactoryClassLocation
public String getFactoryClassLocation()
-
setFactoryClassLocation
public void setFactoryClassLocation(String factoryClassLocation)
-
getAcquireIncrement
public int getAcquireIncrement()
-
setAcquireIncrement
public void setAcquireIncrement(int acquireIncrement)
-
getOverrideDefaultUser
public String getOverrideDefaultUser()
-
setOverrideDefaultUser
public void setOverrideDefaultUser(String overrideDefaultUser)
-
getOverrideDefaultPassword
public String getOverrideDefaultPassword()
-
setOverrideDefaultPassword
public void setOverrideDefaultPassword(String overrideDefaultPassword)
-
getPropertyCycle
public int getPropertyCycle()
-
setPropertyCycle
public void setPropertyCycle(int propertyCycle)
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-
-