com.alibaba.druid.pool
类 DruidAbstractDataSource

java.lang.Object
  继承者 com.alibaba.druid.pool.WrapperAdapter
      继承者 com.alibaba.druid.pool.DruidAbstractDataSource
所有已实现的接口:
DruidAbstractDataSourceMBean, DataSourceProxy, Serializable, Wrapper, CommonDataSource, DataSource
直接已知子类:
DruidDataSource

public abstract class DruidAbstractDataSource
extends WrapperAdapter
implements DruidAbstractDataSourceMBean, DataSource, DataSourceProxy, Serializable

作者:
wenshao, ljw
另请参见:
序列化表格

字段摘要
static int DEFAULT_INITIAL_SIZE
           
static int DEFAULT_MAX_ACTIVE_SIZE
           
static int DEFAULT_MAX_IDLE
           
static int DEFAULT_MAX_WAIT
           
static long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
          The default value for getMinEvictableIdleTimeMillis().
static int DEFAULT_MIN_IDLE
           
static int DEFAULT_NUM_TESTS_PER_EVICTION_RUN
           
static boolean DEFAULT_TEST_ON_BORROW
           
static boolean DEFAULT_TEST_ON_RETURN
           
static long DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS
           
static long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
           
static String DEFAULT_VALIDATION_QUERY
           
static boolean DEFAULT_WHILE_IDLE
           
 
构造方法摘要
DruidAbstractDataSource(boolean lockFair)
           
 
方法摘要
 void addConnectionProperty(String name, String value)
           
 void addFilters(String filters)
           
 void clearFilters()
           
 void closePreapredStatement(PreparedStatementHolder stmtHolder)
           
 long createConnectionId()
           
 long createMetaDataId()
           
 Connection createPhysicalConnection()
           
 Connection createPhysicalConnection(String url, Properties info)
           
 long createResultSetId()
           
 long createStatementId()
           
 long createTransactionId()
           
 void decrementCachedPreparedStatementCount()
           
abstract  void discardConnection(Connection realConnection)
           
 Set<DruidPooledConnection> getActiveConnections()
           
 List<String> getActiveConnectionStackTrace()
           
abstract  int getActivePeak()
           
 long getCachedPreparedStatementAccessCount()
           
 long getCachedPreparedStatementCount()
           
 long getCachedPreparedStatementDeleteCount()
           
 long getCachedPreparedStatementHitCount()
           
 long getCachedPreparedStatementMissCount()
           
 long getClosedPreparedStatementCount()
           
 long getCommitCount()
           
 CompositeDataSupport getCompositeData()
           
 int getConnectionErrorRetryAttempts()
           
 Collection<String> getConnectionInitSqls()
           
 Properties getConnectProperties()
           
 Date getCreatedTime()
           
 long getCreateErrorCount()
           
 long getCreateTimespanMillis()
           
 long getCreateTimespanNano()
           
 String getDbType()
           
 String getDefaultCatalog()
           
 Boolean getDefaultReadOnly()
           
 Integer getDefaultTransactionIsolation()
           
 Driver getDriver()
           
 ClassLoader getDriverClassLoader()
           
 String getDriverClassName()
           
 int getDriverMajorVersion()
           
 int getDriverMinorVersion()
           
 long getDupCloseCount()
           
 ExceptionSorter getExceptionSorter()
           
 String getExceptionSorterClassName()
           
 long getExecuteCount()
           
 String[] getFilterClasses()
           
 long getID()
           
 int getInitialSize()
           
 Throwable getLastCreateError()
           
 Date getLastCreateErrorTime()
           
 long getLastCreateErrorTimeMillis()
           
 Throwable getLastError()
           
 Date getLastErrorTime()
           
 long getLastErrorTimeMillis()
           
 int getLoginTimeout()
           
 PrintWriter getLogWriter()
           
 int getMaxActive()
           
 int getMaxIdle()
           
 int getMaxOpenPreparedStatements()
           
 int getMaxPoolPreparedStatementPerConnectionSize()
           
 long getMaxWait()
           
 int getMaxWaitThreadCount()
           
 long getMinEvictableIdleTimeMillis()
           
 int getMinIdle()
           
 String getName()
           
 int getNumTestsPerEvictionRun()
           
 ObjectName getObjectName()
           
 Logger getParentLogger()
           
 String getPassword()
           
 PasswordCallback getPasswordCallback()
           
 long getPreparedStatementCount()
           
abstract  String getProperties()
           
 List<Filter> getProxyFilters()
           
 int getQueryTimeout()
          Retrieves the number of seconds the driver will wait for a Statement object to execute.
 Driver getRawDriver()
           
abstract  int getRawDriverMajorVersion()
           
abstract  int getRawDriverMinorVersion()
           
 String getRawJdbcUrl()
           
 int getRemoveAbandonedTimeout()
           
 long getRemoveAbandonedTimeoutMillis()
           
 long getRollbackCount()
           
 long getStartTransactionCount()
           
 DruidDataSourceStatLogger getStatLogger()
           
 long getTimeBetweenConnectErrorMillis()
           
 long getTimeBetweenEvictionRunsMillis()
           
 long getTimeBetweenLogStatsMillis()
           
 Histogram getTransactionHistogram()
           
 long[] getTransactionHistogramRanges()
           
 long[] getTransactionHistogramValues()
           
 int getTransactionQueryTimeout()
           
 long getTransactionThresholdMillis()
           
 String getUrl()
           
 NameCallback getUserCallback()
           
 String getUsername()
           
 String getValidationQuery()
           
 int getValidationQueryTimeout()
           
 ValidConnectionChecker getValidConnectionChecker()
           
 String getValidConnectionCheckerClassName()
           
abstract  void handleConnectionException(DruidPooledConnection pooledConnection, Throwable t)
           
 void incrementCachedPreparedStatementCount()
           
 void incrementCachedPreparedStatementDeleteCount()
           
 void incrementCachedPreparedStatementHitCount()
           
 void incrementCachedPreparedStatementMissCount()
           
 void incrementClosedPreparedStatementCount()
           
 void incrementCommitCount()
           
 void incrementDupCloseCount()
           
 void incrementExecuteCount()
           
 void incrementPreparedStatementCount()
           
 void incrementRollbackCount()
           
 void incrementStartTransactionCount()
           
 void initPhysicalConnection(Connection conn)
           
 boolean isAccessToUnderlyingConnectionAllowed()
           
 boolean isBreakAfterAcquireFailure()
           
 boolean isClearFiltersEnable()
           
 boolean isDefaultAutoCommit()
           
 boolean isDupCloseLogEnable()
           
 boolean isLogAbandoned()
           
 boolean isOracle()
           
 boolean isPoolPreparedStatements()
           
 boolean isRemoveAbandoned()
           
 boolean isSharePreparedStatements()
           
 boolean isTestOnBorrow()
           
 boolean isTestOnReturn()
           
 boolean isTestWhileIdle()
           
 boolean isUseLocalSessionState()
           
 boolean isUseOracleImplicitCache()
           
 boolean isUseUnfairLock()
           
abstract  void logTransaction(TransactionInfo info)
           
 void setAccessToUnderlyingConnectionAllowed(boolean accessToUnderlyingConnectionAllowed)
           
 void setBreakAfterAcquireFailure(boolean breakAfterAcquireFailure)
           
 void setClearFiltersEnable(boolean clearFiltersEnable)
           
 void setConnectionErrorRetryAttempts(int connectionErrorRetryAttempts)
           
 void setConnectionInitSqls(Collection<? extends Object> connectionInitSqls)
           
 void setConnectionProperties(String connectionProperties)
           
abstract  void setConnectProperties(Properties properties)
           
 void setDbType(String dbType)
           
 void setDefaultAutoCommit(boolean defaultAutoCommit)
           
 void setDefaultCatalog(String defaultCatalog)
           
 void setDefaultReadOnly(Boolean defaultReadOnly)
           
 void setDefaultTransactionIsolation(Integer defaultTransactionIsolation)
           
 void setDriver(Driver driver)
           
 void setDriverClassLoader(ClassLoader driverClassLoader)
           
 void setDriverClassName(String driverClass)
           
 void setDupCloseLogEnable(boolean dupCloseLogEnable)
           
 void setExceptionSorter(ExceptionSorter exceptionSoter)
           
 void setExceptionSorter(String exceptionSorter)
           
 void setExceptionSorterClassName(String exceptionSorter)
           
 void setFilters(String filters)
           
 void setInitialSize(int initialSize)
           
 void setLogAbandoned(boolean logAbandoned)
           
 void setLoginTimeout(int seconds)
           
 void setLogWriter(PrintWriter out)
           
abstract  void setMaxActive(int maxActive)
           
 void setMaxIdle(int maxIdle)
          已过时。 
 void setMaxOpenPreparedStatements(int maxOpenPreparedStatements)
           
 void setMaxPoolPreparedStatementPerConnectionSize(int maxPoolPreparedStatementPerConnectionSize)
           
 void setMaxWait(long maxWaitMillis)
           
 void setMaxWaitThreadCount(int maxWaithThreadCount)
           
 void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
           
 void setMinIdle(int value)
           
 void setName(String name)
           
 void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
          已过时。 
 void setObjectName(ObjectName objectName)
           
 void setOracle(boolean isOracle)
           
 void setPassword(String password)
           
 void setPasswordCallback(PasswordCallback passwordCallback)
           
 void setPasswordCallbackClassName(String passwordCallbackClassName)
           
abstract  void setPoolPreparedStatements(boolean value)
           
 void setProxyFilters(List<Filter> filters)
           
 void setQueryTimeout(int seconds)
          Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.
 void setRemoveAbandoned(boolean removeAbandoned)
           
 void setRemoveAbandonedTimeout(int removeAbandonedTimeout)
           
 void setRemoveAbandonedTimeoutMillis(long removeAbandonedTimeoutMillis)
           
 void setSharePreparedStatements(boolean sharePreparedStatements)
           
 void setStatLogger(DruidDataSourceStatLogger statLogger)
           
 void setStatLoggerClassName(String className)
           
 void setTestOnBorrow(boolean testOnBorrow)
           
 void setTestOnReturn(boolean testOnReturn)
           
 void setTestWhileIdle(boolean testWhileIdle)
           
 void setTimeBetweenConnectErrorMillis(long timeBetweenConnectErrorMillis)
           
 void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
           
 void setTimeBetweenLogStatsMillis(long timeBetweenLogStatsMillis)
           
 void setTransactionQueryTimeout(int transactionQueryTimeout)
           
 void setTransactionThresholdMillis(long transactionThresholdMillis)
           
 void setUrl(String jdbcUrl)
           
 void setUseLocalSessionState(boolean useLocalSessionState)
           
 void setUseOracleImplicitCache(boolean useOracleImplicitCache)
           
 void setUserCallback(NameCallback userCallback)
           
 void setUsername(String username)
           
 void setUseUnfairLock(boolean useUnfairLock)
           
 void setValidationQuery(String validationQuery)
           
 void setValidationQueryTimeout(int validationQueryTimeout)
           
 void setValidConnectionChecker(ValidConnectionChecker validConnectionChecker)
           
 void setValidConnectionCheckerClassName(String validConnectionCheckerClass)
           
 void validateConnection(Connection conn)
           
 
从类 com.alibaba.druid.pool.WrapperAdapter 继承的方法
isWrapperFor, unwrap
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 com.alibaba.druid.pool.DruidAbstractDataSourceMBean 继承的方法
getActiveCount, getCloseCount, getConnectCount, getConnectErrorCount, getCreateCount, getDestroyCount, getFilterClassNames, getPoolingCount, getRecycleCount, getRemoveAbandonedCount
 
从接口 javax.sql.DataSource 继承的方法
getConnection, getConnection
 
从接口 java.sql.Wrapper 继承的方法
isWrapperFor, unwrap
 
从接口 com.alibaba.druid.proxy.jdbc.DataSourceProxy 继承的方法
getDataSourceStat
 

字段详细信息

DEFAULT_INITIAL_SIZE

public static final int DEFAULT_INITIAL_SIZE
另请参见:
常量字段值

DEFAULT_MAX_ACTIVE_SIZE

public static final int DEFAULT_MAX_ACTIVE_SIZE
另请参见:
常量字段值

DEFAULT_MAX_IDLE

public static final int DEFAULT_MAX_IDLE
另请参见:
常量字段值

DEFAULT_MIN_IDLE

public static final int DEFAULT_MIN_IDLE
另请参见:
常量字段值

DEFAULT_MAX_WAIT

public static final int DEFAULT_MAX_WAIT
另请参见:
常量字段值

DEFAULT_VALIDATION_QUERY

public static final String DEFAULT_VALIDATION_QUERY

DEFAULT_TEST_ON_BORROW

public static final boolean DEFAULT_TEST_ON_BORROW
另请参见:
常量字段值

DEFAULT_TEST_ON_RETURN

public static final boolean DEFAULT_TEST_ON_RETURN
另请参见:
常量字段值

DEFAULT_WHILE_IDLE

public static final boolean DEFAULT_WHILE_IDLE
另请参见:
常量字段值

DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS

public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
另请参见:
常量字段值

DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS

public static final long DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS
另请参见:
常量字段值

DEFAULT_NUM_TESTS_PER_EVICTION_RUN

public static final int DEFAULT_NUM_TESTS_PER_EVICTION_RUN
另请参见:
常量字段值

DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS

public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
The default value for getMinEvictableIdleTimeMillis().

另请参见:
getMinEvictableIdleTimeMillis(), setMinEvictableIdleTimeMillis(long), 常量字段值
构造方法详细信息

DruidAbstractDataSource

public DruidAbstractDataSource(boolean lockFair)
方法详细信息

isUseLocalSessionState

public boolean isUseLocalSessionState()

setUseLocalSessionState

public void setUseLocalSessionState(boolean useLocalSessionState)

getStatLogger

public DruidDataSourceStatLogger getStatLogger()

setStatLoggerClassName

public void setStatLoggerClassName(String className)

setStatLogger

public void setStatLogger(DruidDataSourceStatLogger statLogger)

getTimeBetweenLogStatsMillis

public long getTimeBetweenLogStatsMillis()

setTimeBetweenLogStatsMillis

public void setTimeBetweenLogStatsMillis(long timeBetweenLogStatsMillis)

isOracle

public boolean isOracle()

setOracle

public void setOracle(boolean isOracle)

isUseUnfairLock

public boolean isUseUnfairLock()

setUseUnfairLock

public void setUseUnfairLock(boolean useUnfairLock)

isUseOracleImplicitCache

public boolean isUseOracleImplicitCache()
指定者:
接口 DruidAbstractDataSourceMBean 中的 isUseOracleImplicitCache

setUseOracleImplicitCache

public void setUseOracleImplicitCache(boolean useOracleImplicitCache)
指定者:
接口 DruidAbstractDataSourceMBean 中的 setUseOracleImplicitCache

getLastCreateError

public Throwable getLastCreateError()

getLastError

public Throwable getLastError()

getLastErrorTimeMillis

public long getLastErrorTimeMillis()

getLastErrorTime

public Date getLastErrorTime()

getLastCreateErrorTimeMillis

public long getLastCreateErrorTimeMillis()

getLastCreateErrorTime

public Date getLastCreateErrorTime()

getTransactionQueryTimeout

public int getTransactionQueryTimeout()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getTransactionQueryTimeout

setTransactionQueryTimeout

public void setTransactionQueryTimeout(int transactionQueryTimeout)

getExecuteCount

public long getExecuteCount()

incrementExecuteCount

public void incrementExecuteCount()

isDupCloseLogEnable

public boolean isDupCloseLogEnable()

setDupCloseLogEnable

public void setDupCloseLogEnable(boolean dupCloseLogEnable)

getObjectName

public ObjectName getObjectName()

setObjectName

public void setObjectName(ObjectName objectName)

getTransactionHistogram

public Histogram getTransactionHistogram()

incrementCachedPreparedStatementCount

public void incrementCachedPreparedStatementCount()

decrementCachedPreparedStatementCount

public void decrementCachedPreparedStatementCount()

incrementCachedPreparedStatementDeleteCount

public void incrementCachedPreparedStatementDeleteCount()

incrementCachedPreparedStatementMissCount

public void incrementCachedPreparedStatementMissCount()

getCachedPreparedStatementMissCount

public long getCachedPreparedStatementMissCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getCachedPreparedStatementMissCount

getCachedPreparedStatementAccessCount

public long getCachedPreparedStatementAccessCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getCachedPreparedStatementAccessCount

getCachedPreparedStatementDeleteCount

public long getCachedPreparedStatementDeleteCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getCachedPreparedStatementDeleteCount

getCachedPreparedStatementCount

public long getCachedPreparedStatementCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getCachedPreparedStatementCount

incrementClosedPreparedStatementCount

public void incrementClosedPreparedStatementCount()

getClosedPreparedStatementCount

public long getClosedPreparedStatementCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getClosedPreparedStatementCount

incrementPreparedStatementCount

public void incrementPreparedStatementCount()

getPreparedStatementCount

public long getPreparedStatementCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getPreparedStatementCount

incrementCachedPreparedStatementHitCount

public void incrementCachedPreparedStatementHitCount()

getCachedPreparedStatementHitCount

public long getCachedPreparedStatementHitCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getCachedPreparedStatementHitCount

getTransactionThresholdMillis

public long getTransactionThresholdMillis()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getTransactionThresholdMillis

setTransactionThresholdMillis

public void setTransactionThresholdMillis(long transactionThresholdMillis)
指定者:
接口 DruidAbstractDataSourceMBean 中的 setTransactionThresholdMillis

logTransaction

public abstract void logTransaction(TransactionInfo info)

getTransactionHistogramValues

public long[] getTransactionHistogramValues()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getTransactionHistogramValues

getTransactionHistogramRanges

public long[] getTransactionHistogramRanges()

getCommitCount

public long getCommitCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getCommitCount

incrementCommitCount

public void incrementCommitCount()

getRollbackCount

public long getRollbackCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getRollbackCount

incrementRollbackCount

public void incrementRollbackCount()

getStartTransactionCount

public long getStartTransactionCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getStartTransactionCount

incrementStartTransactionCount

public void incrementStartTransactionCount()

isBreakAfterAcquireFailure

public boolean isBreakAfterAcquireFailure()
指定者:
接口 DruidAbstractDataSourceMBean 中的 isBreakAfterAcquireFailure

setBreakAfterAcquireFailure

public void setBreakAfterAcquireFailure(boolean breakAfterAcquireFailure)

getConnectionErrorRetryAttempts

public int getConnectionErrorRetryAttempts()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getConnectionErrorRetryAttempts

setConnectionErrorRetryAttempts

public void setConnectionErrorRetryAttempts(int connectionErrorRetryAttempts)

getDupCloseCount

public long getDupCloseCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getDupCloseCount

getMaxPoolPreparedStatementPerConnectionSize

public int getMaxPoolPreparedStatementPerConnectionSize()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getMaxPoolPreparedStatementPerConnectionSize

setMaxPoolPreparedStatementPerConnectionSize

public void setMaxPoolPreparedStatementPerConnectionSize(int maxPoolPreparedStatementPerConnectionSize)
指定者:
接口 DruidAbstractDataSourceMBean 中的 setMaxPoolPreparedStatementPerConnectionSize

isSharePreparedStatements

public boolean isSharePreparedStatements()
指定者:
接口 DruidAbstractDataSourceMBean 中的 isSharePreparedStatements

setSharePreparedStatements

public void setSharePreparedStatements(boolean sharePreparedStatements)

incrementDupCloseCount

public void incrementDupCloseCount()

getValidConnectionChecker

public ValidConnectionChecker getValidConnectionChecker()

setValidConnectionChecker

public void setValidConnectionChecker(ValidConnectionChecker validConnectionChecker)

getValidConnectionCheckerClassName

public String getValidConnectionCheckerClassName()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getValidConnectionCheckerClassName

setValidConnectionCheckerClassName

public void setValidConnectionCheckerClassName(String validConnectionCheckerClass)
                                        throws Exception
抛出:
Exception

getDbType

public String getDbType()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getDbType
指定者:
接口 DataSourceProxy 中的 getDbType

setDbType

public void setDbType(String dbType)

addConnectionProperty

public void addConnectionProperty(String name,
                                  String value)

getConnectionInitSqls

public Collection<String> getConnectionInitSqls()

setConnectionInitSqls

public void setConnectionInitSqls(Collection<? extends Object> connectionInitSqls)

getTimeBetweenConnectErrorMillis

public long getTimeBetweenConnectErrorMillis()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getTimeBetweenConnectErrorMillis

setTimeBetweenConnectErrorMillis

public void setTimeBetweenConnectErrorMillis(long timeBetweenConnectErrorMillis)

getMaxOpenPreparedStatements

public int getMaxOpenPreparedStatements()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getMaxOpenPreparedStatements

setMaxOpenPreparedStatements

public void setMaxOpenPreparedStatements(int maxOpenPreparedStatements)

isLogAbandoned

public boolean isLogAbandoned()
指定者:
接口 DruidAbstractDataSourceMBean 中的 isLogAbandoned

setLogAbandoned

public void setLogAbandoned(boolean logAbandoned)
指定者:
接口 DruidAbstractDataSourceMBean 中的 setLogAbandoned

getRemoveAbandonedTimeout

public int getRemoveAbandonedTimeout()

setRemoveAbandonedTimeout

public void setRemoveAbandonedTimeout(int removeAbandonedTimeout)

setRemoveAbandonedTimeoutMillis

public void setRemoveAbandonedTimeoutMillis(long removeAbandonedTimeoutMillis)

getRemoveAbandonedTimeoutMillis

public long getRemoveAbandonedTimeoutMillis()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getRemoveAbandonedTimeoutMillis

isRemoveAbandoned

public boolean isRemoveAbandoned()
指定者:
接口 DruidAbstractDataSourceMBean 中的 isRemoveAbandoned

setRemoveAbandoned

public void setRemoveAbandoned(boolean removeAbandoned)

getMinEvictableIdleTimeMillis

public long getMinEvictableIdleTimeMillis()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getMinEvictableIdleTimeMillis

setMinEvictableIdleTimeMillis

public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)

getNumTestsPerEvictionRun

public int getNumTestsPerEvictionRun()

setNumTestsPerEvictionRun

@Deprecated
public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
已过时。 

参数:
numTestsPerEvictionRun -

getTimeBetweenEvictionRunsMillis

public long getTimeBetweenEvictionRunsMillis()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getTimeBetweenEvictionRunsMillis

setTimeBetweenEvictionRunsMillis

public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)

getMaxWaitThreadCount

public int getMaxWaitThreadCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getMaxWaitThreadCount

setMaxWaitThreadCount

public void setMaxWaitThreadCount(int maxWaithThreadCount)

getValidationQuery

public String getValidationQuery()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getValidationQuery

setValidationQuery

public void setValidationQuery(String validationQuery)

getValidationQueryTimeout

public int getValidationQueryTimeout()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getValidationQueryTimeout

setValidationQueryTimeout

public void setValidationQueryTimeout(int validationQueryTimeout)

isAccessToUnderlyingConnectionAllowed

public boolean isAccessToUnderlyingConnectionAllowed()

setAccessToUnderlyingConnectionAllowed

public void setAccessToUnderlyingConnectionAllowed(boolean accessToUnderlyingConnectionAllowed)

isTestOnBorrow

public boolean isTestOnBorrow()
指定者:
接口 DruidAbstractDataSourceMBean 中的 isTestOnBorrow

setTestOnBorrow

public void setTestOnBorrow(boolean testOnBorrow)
指定者:
接口 DruidAbstractDataSourceMBean 中的 setTestOnBorrow

isTestOnReturn

public boolean isTestOnReturn()
指定者:
接口 DruidAbstractDataSourceMBean 中的 isTestOnReturn

setTestOnReturn

public void setTestOnReturn(boolean testOnReturn)

isTestWhileIdle

public boolean isTestWhileIdle()
指定者:
接口 DruidAbstractDataSourceMBean 中的 isTestWhileIdle

setTestWhileIdle

public void setTestWhileIdle(boolean testWhileIdle)
指定者:
接口 DruidAbstractDataSourceMBean 中的 setTestWhileIdle

isDefaultAutoCommit

public boolean isDefaultAutoCommit()
指定者:
接口 DruidAbstractDataSourceMBean 中的 isDefaultAutoCommit

setDefaultAutoCommit

public void setDefaultAutoCommit(boolean defaultAutoCommit)

getDefaultReadOnly

public Boolean getDefaultReadOnly()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getDefaultReadOnly

setDefaultReadOnly

public void setDefaultReadOnly(Boolean defaultReadOnly)

getDefaultTransactionIsolation

public Integer getDefaultTransactionIsolation()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getDefaultTransactionIsolation

setDefaultTransactionIsolation

public void setDefaultTransactionIsolation(Integer defaultTransactionIsolation)

getDefaultCatalog

public String getDefaultCatalog()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getDefaultCatalog

setDefaultCatalog

public void setDefaultCatalog(String defaultCatalog)

getPasswordCallback

public PasswordCallback getPasswordCallback()

setPasswordCallback

public void setPasswordCallback(PasswordCallback passwordCallback)

setPasswordCallbackClassName

public void setPasswordCallbackClassName(String passwordCallbackClassName)
                                  throws Exception
抛出:
Exception

getUserCallback

public NameCallback getUserCallback()

setUserCallback

public void setUserCallback(NameCallback userCallback)

getQueryTimeout

public int getQueryTimeout()
Retrieves the number of seconds the driver will wait for a Statement object to execute. If the limit is exceeded, a SQLException is thrown.

指定者:
接口 DruidAbstractDataSourceMBean 中的 getQueryTimeout
返回:
the current query timeout limit in seconds; zero means there is no limit
抛出:
SQLException - if a database access error occurs or this method is called on a closed Statement
另请参见:
setQueryTimeout(int)

setQueryTimeout

public void setQueryTimeout(int seconds)
Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds. If the limit is exceeded, an SQLException is thrown. A JDBC driver must apply this limit to the execute, executeQuery and executeUpdate methods. JDBC driver implementations may also apply this limit to ResultSet methods (consult your driver vendor documentation for details).

参数:
seconds - the new query timeout limit in seconds; zero means there is no limit
抛出:
SQLException - if a database access error occurs, this method is called on a closed Statement or the condition seconds >= 0 is not satisfied
另请参见:
getQueryTimeout()

getName

public String getName()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getName
指定者:
接口 DataSourceProxy 中的 getName

setName

public void setName(String name)

isPoolPreparedStatements

public boolean isPoolPreparedStatements()
指定者:
接口 DruidAbstractDataSourceMBean 中的 isPoolPreparedStatements

setPoolPreparedStatements

public abstract void setPoolPreparedStatements(boolean value)

getMaxWait

public long getMaxWait()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getMaxWait

setMaxWait

public void setMaxWait(long maxWaitMillis)

getMinIdle

public int getMinIdle()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getMinIdle

setMinIdle

public void setMinIdle(int value)

getMaxIdle

public int getMaxIdle()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getMaxIdle

setMaxIdle

@Deprecated
public void setMaxIdle(int maxIdle)
已过时。 


getInitialSize

public int getInitialSize()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getInitialSize

setInitialSize

public void setInitialSize(int initialSize)

getCreateErrorCount

public long getCreateErrorCount()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getCreateErrorCount

getMaxActive

public int getMaxActive()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getMaxActive

setMaxActive

public abstract void setMaxActive(int maxActive)
指定者:
接口 DruidAbstractDataSourceMBean 中的 setMaxActive

getUsername

public String getUsername()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getUsername

setUsername

public void setUsername(String username)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

getConnectProperties

public Properties getConnectProperties()
指定者:
接口 DataSourceProxy 中的 getConnectProperties

setConnectProperties

public abstract void setConnectProperties(Properties properties)

setConnectionProperties

public void setConnectionProperties(String connectionProperties)

getUrl

public String getUrl()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getUrl
指定者:
接口 DataSourceProxy 中的 getUrl

getRawJdbcUrl

public String getRawJdbcUrl()
指定者:
接口 DataSourceProxy 中的 getRawJdbcUrl

setUrl

public void setUrl(String jdbcUrl)

getDriverClassName

public String getDriverClassName()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getDriverClassName

setDriverClassName

public void setDriverClassName(String driverClass)

getDriverClassLoader

public ClassLoader getDriverClassLoader()

setDriverClassLoader

public void setDriverClassLoader(ClassLoader driverClassLoader)

getLogWriter

public PrintWriter getLogWriter()
指定者:
接口 CommonDataSource 中的 getLogWriter

setLogWriter

public void setLogWriter(PrintWriter out)
                  throws SQLException
指定者:
接口 CommonDataSource 中的 setLogWriter
抛出:
SQLException

setLoginTimeout

public void setLoginTimeout(int seconds)
指定者:
接口 CommonDataSource 中的 setLoginTimeout

getLoginTimeout

public int getLoginTimeout()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getLoginTimeout
指定者:
接口 CommonDataSource 中的 getLoginTimeout

getDriver

public Driver getDriver()

setDriver

public void setDriver(Driver driver)

getDriverMajorVersion

public int getDriverMajorVersion()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getDriverMajorVersion

getDriverMinorVersion

public int getDriverMinorVersion()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getDriverMinorVersion

getExceptionSorter

public ExceptionSorter getExceptionSorter()

getExceptionSorterClassName

public String getExceptionSorterClassName()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getExceptionSorterClassName

setExceptionSorter

public void setExceptionSorter(ExceptionSorter exceptionSoter)

setExceptionSorterClassName

public void setExceptionSorterClassName(String exceptionSorter)
                                 throws Exception
抛出:
Exception

setExceptionSorter

public void setExceptionSorter(String exceptionSorter)
                        throws SQLException
抛出:
SQLException

getProxyFilters

public List<Filter> getProxyFilters()
指定者:
接口 DataSourceProxy 中的 getProxyFilters

setProxyFilters

public void setProxyFilters(List<Filter> filters)

getFilterClasses

public String[] getFilterClasses()

setFilters

public void setFilters(String filters)
                throws SQLException
抛出:
SQLException

addFilters

public void addFilters(String filters)
                throws SQLException
抛出:
SQLException

clearFilters

public void clearFilters()

validateConnection

public void validateConnection(Connection conn)
                        throws SQLException
抛出:
SQLException

getActiveConnections

public Set<DruidPooledConnection> getActiveConnections()

getActiveConnectionStackTrace

public List<String> getActiveConnectionStackTrace()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getActiveConnectionStackTrace

getCreateTimespanNano

public long getCreateTimespanNano()

getCreateTimespanMillis

public long getCreateTimespanMillis()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getCreateTimespanMillis

getRawDriver

public Driver getRawDriver()
指定者:
接口 DataSourceProxy 中的 getRawDriver

isClearFiltersEnable

public boolean isClearFiltersEnable()

setClearFiltersEnable

public void setClearFiltersEnable(boolean clearFiltersEnable)

createConnectionId

public long createConnectionId()
指定者:
接口 DataSourceProxy 中的 createConnectionId

createStatementId

public long createStatementId()
指定者:
接口 DataSourceProxy 中的 createStatementId

createMetaDataId

public long createMetaDataId()
指定者:
接口 DataSourceProxy 中的 createMetaDataId

createResultSetId

public long createResultSetId()
指定者:
接口 DataSourceProxy 中的 createResultSetId

createTransactionId

public long createTransactionId()
指定者:
接口 DataSourceProxy 中的 createTransactionId

handleConnectionException

public abstract void handleConnectionException(DruidPooledConnection pooledConnection,
                                               Throwable t)
                                        throws SQLException
抛出:
SQLException

createPhysicalConnection

public Connection createPhysicalConnection(String url,
                                           Properties info)
                                    throws SQLException
抛出:
SQLException

createPhysicalConnection

public Connection createPhysicalConnection()
                                    throws SQLException
抛出:
SQLException

initPhysicalConnection

public void initPhysicalConnection(Connection conn)
                            throws SQLException
抛出:
SQLException

getActivePeak

public abstract int getActivePeak()

getCompositeData

public CompositeDataSupport getCompositeData()
                                      throws JMException
抛出:
JMException

getID

public long getID()

getCreatedTime

public Date getCreatedTime()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getCreatedTime

getRawDriverMajorVersion

public abstract int getRawDriverMajorVersion()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getRawDriverMajorVersion

getRawDriverMinorVersion

public abstract int getRawDriverMinorVersion()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getRawDriverMinorVersion

getProperties

public abstract String getProperties()
指定者:
接口 DruidAbstractDataSourceMBean 中的 getProperties

getParentLogger

public Logger getParentLogger()
                       throws SQLFeatureNotSupportedException
抛出:
SQLFeatureNotSupportedException

closePreapredStatement

public void closePreapredStatement(PreparedStatementHolder stmtHolder)

discardConnection

public abstract void discardConnection(Connection realConnection)


Copyright © 2013-2014 Alibaba Group. All Rights Reserved.