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 Details

    • DruidDataSourceC3P0Adapter

      public DruidDataSourceC3P0Adapter()
  • Method Details

    • getLogWriter

      public PrintWriter getLogWriter() throws SQLException
      Specified by:
      getLogWriter in interface CommonDataSource
      Specified by:
      getLogWriter in interface DataSource
      Throws:
      SQLException
    • setLogWriter

      public void setLogWriter(PrintWriter out) throws SQLException
      Specified by:
      setLogWriter in interface CommonDataSource
      Specified by:
      setLogWriter in interface DataSource
      Throws:
      SQLException
    • setLoginTimeout

      public void setLoginTimeout(int seconds) throws SQLException
      Specified by:
      setLoginTimeout in interface CommonDataSource
      Specified by:
      setLoginTimeout in interface DataSource
      Throws:
      SQLException
    • getLoginTimeout

      public int getLoginTimeout() throws SQLException
      Specified by:
      getLoginTimeout in interface CommonDataSource
      Specified by:
      getLoginTimeout in interface DataSource
      Throws:
      SQLException
    • unwrap

      public <T> T unwrap(Class<T> iface) throws SQLException
      Specified by:
      unwrap in interface Wrapper
      Throws:
      SQLException
    • isWrapperFor

      public boolean isWrapperFor(Class<?> iface) throws SQLException
      Specified by:
      isWrapperFor in interface Wrapper
      Throws:
      SQLException
    • getConnection

      public Connection getConnection() throws SQLException
      Specified by:
      getConnection in interface DataSource
      Throws:
      SQLException
    • getConnection

      public Connection getConnection(String username, String password) throws SQLException
      Specified by:
      getConnection in interface DataSource
      Throws:
      SQLException
    • getDriverClass

      public String getDriverClass()
      Specified by:
      getDriverClass in interface DruidDataSourceC3P0AdapterMBean
    • setDriverClass

      public void setDriverClass(String driverClass)
    • getJdbcUrl

      public String getJdbcUrl()
      Specified by:
      getJdbcUrl in interface DruidDataSourceC3P0AdapterMBean
    • getDriver

      public Driver getDriver()
    • setDriver

      public void setDriver(Driver driver)
    • setJdbcUrl

      public void setJdbcUrl(String jdbcUrl)
    • getProperties

      public Properties getProperties()
      Specified by:
      getProperties in interface DruidDataSourceC3P0AdapterMBean
    • setProperties

      public void setProperties(Properties properties)
    • getUser

      public String getUser()
      Specified by:
      getUser in interface DruidDataSourceC3P0AdapterMBean
    • setUser

      public void setUser(String user)
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
    • getCheckoutTimeout

      public int getCheckoutTimeout()
      Specified by:
      getCheckoutTimeout in interface DruidDataSourceC3P0AdapterMBean
    • setCheckoutTimeout

      public void setCheckoutTimeout(int checkoutTimeout)
    • isAutoCommitOnClose

      public boolean isAutoCommitOnClose()
      Specified by:
      isAutoCommitOnClose in interface DruidDataSourceC3P0AdapterMBean
    • setAutoCommitOnClose

      public void setAutoCommitOnClose(boolean autoCommitOnClose)
    • getIdleConnectionTestPeriod

      public int getIdleConnectionTestPeriod()
      Specified by:
      getIdleConnectionTestPeriod in interface DruidDataSourceC3P0AdapterMBean
    • setIdleConnectionTestPeriod

      public void setIdleConnectionTestPeriod(int idleConnectionTestPeriod)
    • getInitialPoolSize

      public int getInitialPoolSize()
      Specified by:
      getInitialPoolSize in interface DruidDataSourceC3P0AdapterMBean
    • setInitialPoolSize

      public void setInitialPoolSize(int initialPoolSize)
    • getMaxIdleTime

      public int getMaxIdleTime()
      Specified by:
      getMaxIdleTime in interface DruidDataSourceC3P0AdapterMBean
    • setMaxIdleTime

      public void setMaxIdleTime(int maxIdleTime)
    • getMaxPoolSize

      public int getMaxPoolSize()
      Specified by:
      getMaxPoolSize in interface DruidDataSourceC3P0AdapterMBean
    • setMaxPoolSize

      public void setMaxPoolSize(int maxPoolSize)
    • getMinPoolSize

      public int getMinPoolSize()
      Specified by:
      getMinPoolSize in interface DruidDataSourceC3P0AdapterMBean
    • setMinPoolSize

      public void setMinPoolSize(int minPoolSize)
    • isTestConnectionOnCheckout

      public boolean isTestConnectionOnCheckout()
      Specified by:
      isTestConnectionOnCheckout in interface DruidDataSourceC3P0AdapterMBean
    • setTestConnectionOnCheckout

      public void setTestConnectionOnCheckout(boolean testConnectionOnCheckout)
    • isTestConnectionOnCheckin

      public boolean isTestConnectionOnCheckin()
      Specified by:
      isTestConnectionOnCheckin in interface DruidDataSourceC3P0AdapterMBean
    • setTestConnectionOnCheckin

      public void setTestConnectionOnCheckin(boolean testConnectionOnCheckin)
    • getPreferredTestQuery

      public String getPreferredTestQuery()
      Specified by:
      getPreferredTestQuery in interface DruidDataSourceC3P0AdapterMBean
    • setPreferredTestQuery

      public void setPreferredTestQuery(String preferredTestQuery)
    • setFilters

      public void setFilters(String filters) throws SQLException
      Throws:
      SQLException
    • getProxyFilters

      public List<Filter> getProxyFilters()
    • setProxyFilters

      public void setProxyFilters(List<Filter> filters)
    • getDataSourceName

      public String getDataSourceName()
      Specified by:
      getDataSourceName in interface DruidDataSourceC3P0AdapterMBean
    • getNumConnections

      public int getNumConnections()
      Specified by:
      getNumConnections in interface DruidDataSourceC3P0AdapterMBean
    • getNumIdleConnections

      public int getNumIdleConnections()
      Specified by:
      getNumIdleConnections in interface DruidDataSourceC3P0AdapterMBean
    • getNumBusyConnections

      public int getNumBusyConnections()
      Specified by:
      getNumBusyConnections in interface DruidDataSourceC3P0AdapterMBean
    • 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 interface DruidDataSourceC3P0AdapterMBean
    • shrink

      public void shrink()
      Specified by:
      shrink in interface DruidDataSourceC3P0AdapterMBean
    • getWaitThreadCount

      public int getWaitThreadCount()
      Specified by:
      getWaitThreadCount in interface DruidDataSourceC3P0AdapterMBean
    • getLockQueueLength

      public int getLockQueueLength()
      Specified by:
      getLockQueueLength in interface DruidDataSourceC3P0AdapterMBean
    • close

      public void close()
      Specified by:
      close in interface DruidDataSourceC3P0AdapterMBean
    • 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:
      getParentLogger in interface CommonDataSource
      Throws:
      SQLFeatureNotSupportedException