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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
int
int
int
int
getConnection
(String username, String password) int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
getUser()
int
boolean
boolean
boolean
boolean
isEnable()
boolean
boolean
boolean
boolean
boolean
isWrapperFor
(Class<?> iface) void
setAcquireIncrement
(int acquireIncrement) void
setAcquireRetryAttempts
(int acquireRetryAttempts) void
setAcquireRetryDelay
(int acquireRetryDelay) void
setAutoCommitOnClose
(boolean autoCommitOnClose) void
setAutomaticTestTable
(String automaticTestTable) void
setBreakAfterAcquireFailure
(boolean breakAfterAcquireFailure) void
setCheckoutTimeout
(int checkoutTimeout) void
setConnectionCustomizerClassName
(String connectionCustomizerClassName) void
setConnectionTesterClassName
(String connectionTesterClassName) void
setDebugUnreturnedConnectionStackTraces
(boolean debugUnreturnedConnectionStackTraces) void
void
setDriverClass
(String driverClass) void
setFactoryClassLocation
(String factoryClassLocation) void
setFilters
(String filters) void
setForceIgnoreUnresolvedTransactions
(boolean forceIgnoreUnresolvedTransactions) void
setIdleConnectionTestPeriod
(int idleConnectionTestPeriod) void
setInitialPoolSize
(int initialPoolSize) void
setJdbcUrl
(String jdbcUrl) void
setLoginTimeout
(int seconds) void
setLogWriter
(PrintWriter out) void
setMaxAdministrativeTaskTime
(int maxAdministrativeTaskTime) void
setMaxConnectionAge
(int maxConnectionAge) void
setMaxIdleTime
(int maxIdleTime) void
setMaxIdleTimeExcessConnections
(int maxIdleTimeExcessConnections) void
setMaxPoolSize
(int maxPoolSize) void
setMaxStatements
(int maxStatements) void
setMaxStatementsPerConnection
(int maxStatementsPerConnection) void
setMinPoolSize
(int minPoolSize) void
setOverrideDefaultPassword
(String overrideDefaultPassword) void
setOverrideDefaultUser
(String overrideDefaultUser) void
setPassword
(String password) void
setPreferredTestQuery
(String preferredTestQuery) void
setProperties
(Properties properties) void
setPropertyCycle
(int propertyCycle) void
setProxyFilters
(List<Filter> filters) void
setTestConnectionOnCheckin
(boolean testConnectionOnCheckin) void
setTestConnectionOnCheckout
(boolean testConnectionOnCheckout) void
setUnreturnedConnectionTimeout
(int unreturnedConnectionTimeout) void
void
setUserOverridesAsString
(String userOverridesAsString) void
setUsesTraditionalReflectiveProxies
(boolean usesTraditionalReflectiveProxies) void
shrink()
<T> T
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
-
Constructor Details
-
DruidDataSourceC3P0Adapter
public DruidDataSourceC3P0Adapter()
-
-
Method Details
-
getLogWriter
- Specified by:
getLogWriter
in interfaceCommonDataSource
- Specified by:
getLogWriter
in interfaceDataSource
- Throws:
SQLException
-
setLogWriter
- Specified by:
setLogWriter
in interfaceCommonDataSource
- Specified by:
setLogWriter
in interfaceDataSource
- Throws:
SQLException
-
setLoginTimeout
- Specified by:
setLoginTimeout
in interfaceCommonDataSource
- Specified by:
setLoginTimeout
in interfaceDataSource
- Throws:
SQLException
-
getLoginTimeout
- Specified by:
getLoginTimeout
in interfaceCommonDataSource
- Specified by:
getLoginTimeout
in interfaceDataSource
- Throws:
SQLException
-
unwrap
- Specified by:
unwrap
in interfaceWrapper
- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperFor
in interfaceWrapper
- Throws:
SQLException
-
getConnection
- Specified by:
getConnection
in interfaceDataSource
- Throws:
SQLException
-
getConnection
- Specified by:
getConnection
in interfaceDataSource
- Throws:
SQLException
-
getDriverClass
- Specified by:
getDriverClass
in interfaceDruidDataSourceC3P0AdapterMBean
-
setDriverClass
-
getJdbcUrl
- Specified by:
getJdbcUrl
in interfaceDruidDataSourceC3P0AdapterMBean
-
getDriver
-
setDriver
-
setJdbcUrl
-
getProperties
- Specified by:
getProperties
in interfaceDruidDataSourceC3P0AdapterMBean
-
setProperties
-
getUser
- Specified by:
getUser
in interfaceDruidDataSourceC3P0AdapterMBean
-
setUser
-
getPassword
-
setPassword
-
getCheckoutTimeout
public int getCheckoutTimeout()- Specified by:
getCheckoutTimeout
in interfaceDruidDataSourceC3P0AdapterMBean
-
setCheckoutTimeout
public void setCheckoutTimeout(int checkoutTimeout) -
isAutoCommitOnClose
public boolean isAutoCommitOnClose()- Specified by:
isAutoCommitOnClose
in interfaceDruidDataSourceC3P0AdapterMBean
-
setAutoCommitOnClose
public void setAutoCommitOnClose(boolean autoCommitOnClose) -
getIdleConnectionTestPeriod
public int getIdleConnectionTestPeriod()- Specified by:
getIdleConnectionTestPeriod
in interfaceDruidDataSourceC3P0AdapterMBean
-
setIdleConnectionTestPeriod
public void setIdleConnectionTestPeriod(int idleConnectionTestPeriod) -
getInitialPoolSize
public int getInitialPoolSize()- Specified by:
getInitialPoolSize
in interfaceDruidDataSourceC3P0AdapterMBean
-
setInitialPoolSize
public void setInitialPoolSize(int initialPoolSize) -
getMaxIdleTime
public int getMaxIdleTime()- Specified by:
getMaxIdleTime
in interfaceDruidDataSourceC3P0AdapterMBean
-
setMaxIdleTime
public void setMaxIdleTime(int maxIdleTime) -
getMaxPoolSize
public int getMaxPoolSize()- Specified by:
getMaxPoolSize
in interfaceDruidDataSourceC3P0AdapterMBean
-
setMaxPoolSize
public void setMaxPoolSize(int maxPoolSize) -
getMinPoolSize
public int getMinPoolSize()- Specified by:
getMinPoolSize
in interfaceDruidDataSourceC3P0AdapterMBean
-
setMinPoolSize
public void setMinPoolSize(int minPoolSize) -
isTestConnectionOnCheckout
public boolean isTestConnectionOnCheckout()- Specified by:
isTestConnectionOnCheckout
in interfaceDruidDataSourceC3P0AdapterMBean
-
setTestConnectionOnCheckout
public void setTestConnectionOnCheckout(boolean testConnectionOnCheckout) -
isTestConnectionOnCheckin
public boolean isTestConnectionOnCheckin()- Specified by:
isTestConnectionOnCheckin
in interfaceDruidDataSourceC3P0AdapterMBean
-
setTestConnectionOnCheckin
public void setTestConnectionOnCheckin(boolean testConnectionOnCheckin) -
getPreferredTestQuery
- Specified by:
getPreferredTestQuery
in interfaceDruidDataSourceC3P0AdapterMBean
-
setPreferredTestQuery
-
setFilters
- Throws:
SQLException
-
getProxyFilters
-
setProxyFilters
-
getDataSourceName
- Specified by:
getDataSourceName
in interfaceDruidDataSourceC3P0AdapterMBean
-
getNumConnections
public int getNumConnections()- Specified by:
getNumConnections
in interfaceDruidDataSourceC3P0AdapterMBean
-
getNumIdleConnections
public int getNumIdleConnections()- Specified by:
getNumIdleConnections
in interfaceDruidDataSourceC3P0AdapterMBean
-
getNumBusyConnections
public int getNumBusyConnections()- Specified by:
getNumBusyConnections
in 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:
isEnable
in interfaceDruidDataSourceC3P0AdapterMBean
-
shrink
public void shrink()- Specified by:
shrink
in interfaceDruidDataSourceC3P0AdapterMBean
-
getWaitThreadCount
public int getWaitThreadCount()- Specified by:
getWaitThreadCount
in interfaceDruidDataSourceC3P0AdapterMBean
-
getLockQueueLength
public int getLockQueueLength()- Specified by:
getLockQueueLength
in interfaceDruidDataSourceC3P0AdapterMBean
-
close
public void close()- Specified by:
close
in interfaceDruidDataSourceC3P0AdapterMBean
-
getConnectionTesterClassName
-
setConnectionTesterClassName
-
getAutomaticTestTable
-
setAutomaticTestTable
-
isForceIgnoreUnresolvedTransactions
public boolean isForceIgnoreUnresolvedTransactions() -
setForceIgnoreUnresolvedTransactions
public void setForceIgnoreUnresolvedTransactions(boolean forceIgnoreUnresolvedTransactions) -
isUsesTraditionalReflectiveProxies
public boolean isUsesTraditionalReflectiveProxies() -
setUsesTraditionalReflectiveProxies
public void setUsesTraditionalReflectiveProxies(boolean usesTraditionalReflectiveProxies) -
getUserOverridesAsString
-
setUserOverridesAsString
-
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
-
setConnectionCustomizerClassName
-
getFactoryClassLocation
-
setFactoryClassLocation
-
getAcquireIncrement
public int getAcquireIncrement() -
setAcquireIncrement
public void setAcquireIncrement(int acquireIncrement) -
getOverrideDefaultUser
-
setOverrideDefaultUser
-
getOverrideDefaultPassword
-
setOverrideDefaultPassword
-
getPropertyCycle
public int getPropertyCycle() -
setPropertyCycle
public void setPropertyCycle(int propertyCycle) -
getParentLogger
- Specified by:
getParentLogger
in interfaceCommonDataSource
- Throws:
SQLFeatureNotSupportedException
-