Package com.alibaba.druid.pool
Class DruidDataSource
java.lang.Object
com.alibaba.druid.pool.WrapperAdapter
com.alibaba.druid.pool.DruidAbstractDataSource
com.alibaba.druid.pool.DruidDataSource
- All Implemented Interfaces:
DruidAbstractDataSourceMBean
,DruidDataSourceMBean
,ManagedDataSource
,DataSourceProxy
,Closeable
,Serializable
,AutoCloseable
,Cloneable
,Wrapper
,MBeanRegistration
,Referenceable
,CommonDataSource
,ConnectionPoolDataSource
,DataSource
- Direct Known Subclasses:
DruidQuartzConnectionProvider
,DruidXADataSource
public class DruidDataSource
extends DruidAbstractDataSource
implements DruidDataSourceMBean, ManagedDataSource, Referenceable, Closeable, Cloneable, ConnectionPoolDataSource, MBeanRegistration
- Author:
- ljw [[email protected]], wenshao [[email protected]]
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
class
class
class
Nested classes/interfaces inherited from class com.alibaba.druid.pool.DruidAbstractDataSource
DruidAbstractDataSource.PhysicalConnectionInfo
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected static final AtomicLongFieldUpdater<DruidDataSource>
protected static final AtomicLongFieldUpdater<DruidDataSource>
protected JdbcDataSourceStat
protected String
Instance keyprotected boolean
protected static final AtomicLongFieldUpdater<DruidDataSource>
protected static final AtomicLongFieldUpdater<DruidDataSource>
static ThreadLocal<Long>
Fields inherited from class com.alibaba.druid.pool.DruidAbstractDataSource
accessToUnderlyingConnectionAllowed, activeConnectionLock, activeConnections, breakAfterAcquireFailure, cachedPreparedStatementCount, cachedPreparedStatementDeleteCount, cachedPreparedStatementHitCount, cachedPreparedStatementMissCount, closedPreparedStatementCount, commitCount, connectionErrorRetryAttempts, connectionIdSeed, connectionInitSqls, connectProperties, connectTimeout, createCount, createdTime, createError, createErrorCount, createScheduler, createStartNanos, createTimespan, creatingCount, dbTypeName, DEFAULT_INITIAL_SIZE, DEFAULT_MAX_ACTIVE_SIZE, DEFAULT_MAX_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_MAX_IDLE, DEFAULT_MAX_WAIT, DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_MIN_IDLE, DEFAULT_NUM_TESTS_PER_EVICTION_RUN, DEFAULT_PHY_TIMEOUT_MILLIS, DEFAULT_TEST_ON_BORROW, DEFAULT_TEST_ON_RETURN, DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS, DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS, DEFAULT_TIME_CONNECT_TIMEOUT_MILLIS, DEFAULT_TIME_SOCKET_TIMEOUT_MILLIS, DEFAULT_VALIDATION_QUERY, DEFAULT_WHILE_IDLE, defaultAutoCommit, defaultCatalog, defaultReadOnly, defaultTransactionIsolation, destroyCount, destroyScheduler, directCreateCount, driver, driverClass, driverClassLoader, dupCloseCount, empty, errorCount, exceptionSorter, executeBatchCount, executeCount, executeQueryCount, executeUpdateCount, failContinuous, failContinuousTimeMillis, failFast, fatalErrorCount, fatalErrorCountLastShrink, filters, id, inited, initedTime, initExceptionThrow, initGlobalVariants, initialSize, initVariants, isMySql, isOracle, jdbcUrl, keepAliveBetweenTimeMillis, lastCreateError, lastCreateErrorTimeMillis, lastCreateStartTimeMillis, lastError, lastErrorTimeMillis, lastFatalError, lastFatalErrorSql, lastFatalErrorTimeMillis, lock, logAbandoned, logWriter, maxActive, maxCreateTaskCount, maxEvictableIdleTimeMillis, maxIdle, maxOpenPreparedStatements, maxPoolPreparedStatementPerConnectionSize, maxWait, maxWaitThreadCount, metaDataIdSeed, minEvictableIdleTimeMillis, minIdle, name, netTimeoutError, netTimeoutExecutor, notEmpty, notFullTimeoutRetryCount, numTestsPerEvictionRun, onFatalError, onFatalErrorMaxActive, password, passwordCallback, phyMaxUseCount, phyTimeoutMillis, poolPreparedStatements, preparedStatementCount, PRESENT, queryTimeout, removeAbandoned, removeAbandonedTimeoutMillis, resultSetIdSeed, rollbackCount, sharePreparedStatements, socketTimeout, startTransactionCount, statementIdSeed, statLogger, testOnBorrow, testOnReturn, testWhileIdle, timeBetweenConnectErrorMillis, timeBetweenEvictionRunsMillis, timeBetweenLogStatsMillis, transactionHistogram, transactionIdSeed, transactionQueryTimeout, transactionThresholdMillis, useOracleImplicitCache, usePingMethod, userCallback, username, validationQuery, validationQueryTimeout, validConnectionChecker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clone()
void
close()
close datasourcevoid
configFromPropety
(Properties properties) protected void
protected void
void
void
discardConnection
(Connection realConnection) Deprecated.dump()
int
fill()
int
fill
(int toCount) void
forEach
(Connection conn) int
int
long
long
long
getConnection
(long maxWaitMillis) getConnection
(String username, String password) getConnectionDirect
(long maxWaitMillis) long
long
long
long
getLock()
int
long
long
long
long
int
int
getPooledConnection
(String user, String password) int
int
int
int
long
long
long
long
getSqlStat
(int sqlId) getSqlStat
(long sqlId) int
getWallStatValue
(boolean reset) void
handleConnectionException
(DruidPooledConnection pooledConnection, Throwable t, String sql) protected final void
handleFatalError
(DruidPooledConnection conn, SQLException error, String sql) void
init()
protected void
boolean
boolean
boolean
isClosed()
boolean
isEnable()
boolean
isFull()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isWrapperFor
(Class<?> iface) void
logStats()
void
void
void
postRegister
(Boolean registrationDone) void
preRegister
(MBeanServer server, ObjectName name) protected boolean
put
(DruidAbstractDataSource.PhysicalConnectionInfo physicalConnectionInfo) protected void
recycle
(DruidPooledConnection pooledConnection) 回收连接void
int
void
protected void
void
restart()
void
restart
(Properties properties) void
setAsyncInit
(boolean asyncInit) void
setCheckExecuteTime
(boolean checkExecuteTime) void
setConnectProperties
(Properties properties) void
setEnable
(boolean enable) void
setKeepAlive
(boolean keepAlive) void
setKillWhenSocketReadTimeout
(boolean killWhenSocketTimeOut) void
setLogDifferentThread
(boolean logDifferentThread) void
setMaxActive
(int maxActive) void
setPoolPreparedStatements
(boolean value) void
setResetStatEnable
(boolean resetStatEnable) void
setUseGlobalDataSourceStat
(boolean useGlobalDataSourceStat) void
shrink()
void
shrink
(boolean checkTime) void
shrink
(boolean checkTime, boolean keepAlive) toString()
void
<T> T
Methods inherited from class com.alibaba.druid.pool.DruidAbstractDataSource
addConnectionProperty, addFilters, clearFilters, cloneTo, closePreapredStatement, createConnectionId, createMetaDataId, createPhysicalConnection, createPhysicalConnection, createResultSetId, createStatementId, createTransactionId, decrementCachedPreparedStatementCount, getActiveConnections, getActiveConnectionStackTrace, getAndResetExecuteCount, getCachedPreparedStatementAccessCount, getCachedPreparedStatementCount, getCachedPreparedStatementDeleteCount, getCachedPreparedStatementHitCount, getCachedPreparedStatementMissCount, getClosedPreparedStatementCount, getCommitCount, getCompositeData, getConnectionErrorRetryAttempts, getConnectionInitSqls, getConnectProperties, getConnectTimeout, getCreatedTime, getCreateErrorCount, getCreateScheduler, getCreateTimespanMillis, getCreateTimespanNano, getDbType, getDefaultCatalog, getDefaultReadOnly, getDefaultTransactionIsolation, getDestroyScheduler, getDriver, getDriverClassLoader, getDriverClassName, getDriverMajorVersion, getDriverMinorVersion, getDupCloseCount, getExceptionSorter, getExceptionSorterClassName, getExecuteBatchCount, getExecuteCount, getExecuteCount2, getExecuteQueryCount, getExecuteUpdateCount, getFilterClasses, getID, getInitialSize, getKeepAliveBetweenTimeMillis, getLastCreateError, getLastCreateErrorTime, getLastCreateErrorTimeMillis, getLastError, getLastErrorTime, getLastErrorTimeMillis, getLoginTimeout, getLogWriter, getMaxActive, getMaxCreateTaskCount, getMaxEvictableIdleTimeMillis, getMaxIdle, getMaxOpenPreparedStatements, getMaxPoolPreparedStatementPerConnectionSize, getMaxWait, getMaxWaitThreadCount, getMinEvictableIdleTimeMillis, getMinIdle, getName, getNotFullTimeoutRetryCount, getNumTestsPerEvictionRun, getObjectName, getOnFatalErrorMaxActive, getParentLogger, getPassword, getPasswordCallback, getPhyMaxUseCount, getPhyTimeoutMillis, getPreparedStatementCount, getProxyFilters, getQueryTimeout, getRawDriver, getRawJdbcUrl, getRemoveAbandonedTimeout, getRemoveAbandonedTimeoutMillis, getRollbackCount, getSocketTimeout, getStartTransactionCount, getStatLogger, getTimeBetweenConnectErrorMillis, getTimeBetweenEvictionRunsMillis, getTimeBetweenLogStatsMillis, getTransactionHistogram, getTransactionHistogramRanges, getTransactionHistogramValues, getTransactionQueryTimeout, getTransactionThresholdMillis, getUrl, getUserCallback, getUsername, getValidationQuery, getValidationQueryTimeout, getValidConnectionChecker, getValidConnectionCheckerClassName, handleConnectionException, incrementCachedPreparedStatementCount, incrementCachedPreparedStatementDeleteCount, incrementCachedPreparedStatementHitCount, incrementCachedPreparedStatementMissCount, incrementClosedPreparedStatementCount, incrementCommitCount, incrementDupCloseCount, incrementExecuteBatchCount, incrementExecuteCount, incrementExecuteQueryCount, incrementExecuteUpdateCount, incrementPreparedStatementCount, incrementRollbackCount, incrementStartTransactionCount, initPhysicalConnection, initPhysicalConnection, isAccessToUnderlyingConnectionAllowed, isAsyncCloseConnectionEnable, isBreakAfterAcquireFailure, isClearFiltersEnable, isDefaultAutoCommit, isDupCloseLogEnable, isFailContinuous, isFailFast, isInited, isInitExceptionThrow, isInitGlobalVariants, isInitVariants, isLogAbandoned, isOnFatalError, isOracle, isPoolPreparedStatements, isRemoveAbandoned, isSharePreparedStatements, isTestOnBorrow, isTestOnReturn, isTestWhileIdle, isUseLocalSessionState, isUseOracleImplicitCache, isUsePingMethod, isUseUnfairLock, setAccessToUnderlyingConnectionAllowed, setAsyncCloseConnectionEnable, setBreakAfterAcquireFailure, setClearFiltersEnable, setConnectionErrorRetryAttempts, setConnectionInitSqls, setConnectionProperties, setConnectTimeout, setCreateError, setCreateScheduler, setDbType, setDbType, setDefaultAutoCommit, setDefaultCatalog, setDefaultReadOnly, setDefaultTransactionIsolation, setDestroyScheduler, setDriver, setDriverClassLoader, setDriverClassName, setDupCloseLogEnable, setExceptionSorter, setExceptionSorter, setExceptionSorterClassName, setFailContinuous, setFailFast, setFilters, setInitExceptionThrow, setInitGlobalVariants, setInitialSize, setInitVariants, setKeepAliveBetweenTimeMillis, setLogAbandoned, setLoginTimeout, setLogWriter, setMaxCreateTaskCount, setMaxEvictableIdleTimeMillis, setMaxIdle, setMaxOpenPreparedStatements, setMaxPoolPreparedStatementPerConnectionSize, setMaxWait, setMaxWaitThreadCount, setMinEvictableIdleTimeMillis, setMinIdle, setName, setNotFullTimeoutRetryCount, setNumTestsPerEvictionRun, setObjectName, setOnFatalErrorMaxActive, setOracle, setPassword, setPasswordCallback, setPasswordCallbackClassName, setPhyMaxUseCount, setPhyTimeoutMillis, setProxyFilters, setQueryTimeout, setRemoveAbandoned, setRemoveAbandonedTimeout, setRemoveAbandonedTimeoutMillis, setSharePreparedStatements, setSocketTimeout, setStatLogger, setStatLoggerClassName, setTestOnBorrow, setTestOnReturn, setTestWhileIdle, setTimeBetweenConnectErrorMillis, setTimeBetweenEvictionRunsMillis, setTimeBetweenLogStatsMillis, setTransactionQueryTimeout, setTransactionThresholdMillis, setUrl, setUseLocalSessionState, setUseOracleImplicitCache, setUsePingMethod, setUserCallback, setUsername, setUseUnfairLock, setValidationQuery, setValidationQueryTimeout, setValidConnectionChecker, setValidConnectionCheckerClassName, testConnectionInternal, testConnectionInternal, validateConnection
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder, getParentLogger
Methods inherited from interface javax.sql.ConnectionPoolDataSource
createPooledConnectionBuilder, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
Methods inherited from interface com.alibaba.druid.pool.DruidAbstractDataSourceMBean
getActiveConnectionStackTrace, getCachedPreparedStatementAccessCount, getCachedPreparedStatementCount, getCachedPreparedStatementDeleteCount, getCachedPreparedStatementHitCount, getCachedPreparedStatementMissCount, getClosedPreparedStatementCount, getCommitCount, getConnectionErrorRetryAttempts, getCreatedTime, getCreateErrorCount, getCreateTimespanMillis, getDbType, getDefaultCatalog, getDefaultReadOnly, getDefaultTransactionIsolation, getDriverClassName, getDriverMajorVersion, getDriverMinorVersion, getDupCloseCount, getExceptionSorterClassName, getInitialSize, getLoginTimeout, getMaxActive, getMaxIdle, getMaxOpenPreparedStatements, getMaxPoolPreparedStatementPerConnectionSize, getMaxWait, getMaxWaitThreadCount, getMinEvictableIdleTimeMillis, getMinIdle, getName, getPreparedStatementCount, getQueryTimeout, getRemoveAbandonedTimeoutMillis, getRollbackCount, getStartTransactionCount, getTimeBetweenConnectErrorMillis, getTimeBetweenEvictionRunsMillis, getTransactionHistogramValues, getTransactionQueryTimeout, getTransactionThresholdMillis, getUsername, getValidationQuery, getValidationQueryTimeout, getValidConnectionCheckerClassName, isBreakAfterAcquireFailure, isDefaultAutoCommit, isLogAbandoned, isPoolPreparedStatements, isRemoveAbandoned, isSharePreparedStatements, isTestOnBorrow, isTestOnReturn, isTestWhileIdle, isUseOracleImplicitCache, setLogAbandoned, setMaxPoolPreparedStatementPerConnectionSize, setTestOnBorrow, setTestWhileIdle, setTransactionThresholdMillis, setUseOracleImplicitCache
Methods inherited from interface com.alibaba.druid.pool.DruidDataSourceMBean
getObjectName, getTimeBetweenLogStatsMillis, getUrl, setConnectionProperties, setStatLoggerClassName, setTimeBetweenLogStatsMillis
Methods inherited from interface com.alibaba.druid.pool.ManagedDataSource
getObjectName, setObjectName
-
Field Details
-
dataSourceStat
-
waitNanosLocal
-
killWhenSocketReadTimeout
protected boolean killWhenSocketReadTimeout -
checkExecuteTime
protected boolean checkExecuteTime -
recycleErrorCountUpdater
-
connectErrorCountUpdater
-
resetCountUpdater
-
createTaskIdSeedUpdater
-
instanceKey
Instance key
-
-
Constructor Details
-
DruidDataSource
public DruidDataSource() -
DruidDataSource
public DruidDataSource(boolean fairLock)
-
-
Method Details
-
isAsyncInit
public boolean isAsyncInit() -
setAsyncInit
public void setAsyncInit(boolean asyncInit) -
configFromPropety
-
isKillWhenSocketReadTimeout
public boolean isKillWhenSocketReadTimeout() -
setKillWhenSocketReadTimeout
public void setKillWhenSocketReadTimeout(boolean killWhenSocketTimeOut) -
isUseGlobalDataSourceStat
public boolean isUseGlobalDataSourceStat()- Specified by:
isUseGlobalDataSourceStat
in interfaceDruidDataSourceMBean
-
setUseGlobalDataSourceStat
public void setUseGlobalDataSourceStat(boolean useGlobalDataSourceStat) -
isKeepAlive
public boolean isKeepAlive() -
setKeepAlive
public void setKeepAlive(boolean keepAlive) -
getInitStackTrace
-
isResetStatEnable
public boolean isResetStatEnable()- Specified by:
isResetStatEnable
in interfaceDruidDataSourceMBean
-
setResetStatEnable
public void setResetStatEnable(boolean resetStatEnable) - Specified by:
setResetStatEnable
in interfaceDruidDataSourceMBean
-
getDiscardCount
public long getDiscardCount()- Specified by:
getDiscardCount
in interfaceDruidDataSourceMBean
-
restart
- Throws:
SQLException
-
restart
- Throws:
SQLException
-
resetStat
public void resetStat()- Specified by:
resetStat
in interfaceDruidDataSourceMBean
-
getResetCount
public long getResetCount()- Specified by:
getResetCount
in interfaceDruidDataSourceMBean
-
isEnable
public boolean isEnable()- Specified by:
isEnable
in interfaceDruidDataSourceMBean
- Specified by:
isEnable
in interfaceManagedDataSource
-
setEnable
public void setEnable(boolean enable) - Specified by:
setEnable
in interfaceManagedDataSource
-
setPoolPreparedStatements
public void setPoolPreparedStatements(boolean value) - Specified by:
setPoolPreparedStatements
in interfaceDruidDataSourceMBean
- Specified by:
setPoolPreparedStatements
in classDruidAbstractDataSource
-
setMaxActive
public void setMaxActive(int maxActive) - Specified by:
setMaxActive
in interfaceDruidAbstractDataSourceMBean
- Specified by:
setMaxActive
in classDruidAbstractDataSource
-
setConnectProperties
- Specified by:
setConnectProperties
in classDruidAbstractDataSource
-
init
- Throws:
SQLException
-
createAndStartDestroyThread
protected void createAndStartDestroyThread() -
createAndStartCreatorThread
protected void createAndStartCreatorThread() -
resolveDriver
- Throws:
SQLException
-
initCheck
- Throws:
SQLException
-
getConnection
- Specified by:
getConnection
in interfaceDataSource
- Throws:
SQLException
-
getConnection
- Throws:
SQLException
-
getPooledConnection
- Specified by:
getPooledConnection
in interfaceConnectionPoolDataSource
- Throws:
SQLException
-
getPooledConnection
- Specified by:
getPooledConnection
in interfaceConnectionPoolDataSource
- Throws:
SQLException
-
getConnectionDirect
- Throws:
SQLException
-
discardConnection
Deprecated.抛弃连接,不进行回收,而是抛弃- Specified by:
discardConnection
in classDruidAbstractDataSource
- Parameters:
realConnection
-
-
discardConnection
- Overrides:
discardConnection
in classDruidAbstractDataSource
-
handleConnectionException
public void handleConnectionException(DruidPooledConnection pooledConnection, Throwable t, String sql) throws SQLException - Specified by:
handleConnectionException
in classDruidAbstractDataSource
- Throws:
SQLException
-
handleFatalError
protected final void handleFatalError(DruidPooledConnection conn, SQLException error, String sql) throws SQLException - Throws:
SQLException
-
recycle
回收连接- Specified by:
recycle
in classDruidAbstractDataSource
- Throws:
SQLException
-
getRecycleErrorCount
public long getRecycleErrorCount() -
clearStatementCache
- Specified by:
clearStatementCache
in interfaceDruidDataSourceMBean
- Throws:
SQLException
-
close
public void close()close datasource- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
registerMbean
public void registerMbean() -
unregisterMbean
public void unregisterMbean() -
isMbeanRegistered
public boolean isMbeanRegistered() -
getConnection
- Specified by:
getConnection
in interfaceDataSource
- Throws:
SQLException
-
getCreateCount
public long getCreateCount()- Specified by:
getCreateCount
in interfaceDruidAbstractDataSourceMBean
-
getDestroyCount
public long getDestroyCount()- Specified by:
getDestroyCount
in interfaceDruidAbstractDataSourceMBean
-
getConnectCount
public long getConnectCount()- Specified by:
getConnectCount
in interfaceDruidAbstractDataSourceMBean
-
getCloseCount
public long getCloseCount()- Specified by:
getCloseCount
in interfaceDruidAbstractDataSourceMBean
-
getConnectErrorCount
public long getConnectErrorCount()- Specified by:
getConnectErrorCount
in interfaceDruidAbstractDataSourceMBean
-
getPoolingCount
public int getPoolingCount()- Specified by:
getPoolingCount
in interfaceDruidAbstractDataSourceMBean
-
getPoolingPeak
public int getPoolingPeak()- Specified by:
getPoolingPeak
in interfaceDruidDataSourceMBean
-
getPoolingPeakTime
- Specified by:
getPoolingPeakTime
in interfaceDruidDataSourceMBean
-
getRecycleCount
public long getRecycleCount()- Specified by:
getRecycleCount
in interfaceDruidAbstractDataSourceMBean
-
getActiveCount
public int getActiveCount()- Specified by:
getActiveCount
in interfaceDruidAbstractDataSourceMBean
-
logStats
public void logStats() -
getStatValueAndReset
-
getRemoveAbandonedCount
public long getRemoveAbandonedCount()- Specified by:
getRemoveAbandonedCount
in interfaceDruidAbstractDataSourceMBean
-
put
-
removeAbandoned
public int removeAbandoned()- Specified by:
removeAbandoned
in interfaceDruidDataSourceMBean
-
getReference
- Specified by:
getReference
in interfaceReferenceable
- Throws:
NamingException
-
getFilterClassNames
- Specified by:
getFilterClassNames
in interfaceDruidAbstractDataSourceMBean
-
getRawDriverMajorVersion
public int getRawDriverMajorVersion()- Specified by:
getRawDriverMajorVersion
in interfaceDruidAbstractDataSourceMBean
- Specified by:
getRawDriverMajorVersion
in classDruidAbstractDataSource
-
getRawDriverMinorVersion
public int getRawDriverMinorVersion()- Specified by:
getRawDriverMinorVersion
in interfaceDruidAbstractDataSourceMBean
- Specified by:
getRawDriverMinorVersion
in classDruidAbstractDataSource
-
getProperties
- Specified by:
getProperties
in interfaceDruidAbstractDataSourceMBean
- Specified by:
getProperties
in classDruidAbstractDataSource
-
shrink
public void shrink()- Specified by:
shrink
in interfaceDruidDataSourceMBean
-
shrink
public void shrink(boolean checkTime) -
shrink
public void shrink(boolean checkTime, boolean keepAlive) -
getWaitThreadCount
public int getWaitThreadCount()- Specified by:
getWaitThreadCount
in interfaceDruidDataSourceMBean
-
getNotEmptyWaitCount
public long getNotEmptyWaitCount()- Specified by:
getNotEmptyWaitCount
in interfaceDruidDataSourceMBean
-
getNotEmptyWaitThreadCount
public int getNotEmptyWaitThreadCount()- Specified by:
getNotEmptyWaitThreadCount
in interfaceDruidDataSourceMBean
-
getNotEmptyWaitThreadPeak
public int getNotEmptyWaitThreadPeak() -
getNotEmptySignalCount
public long getNotEmptySignalCount()- Specified by:
getNotEmptySignalCount
in interfaceDruidDataSourceMBean
-
getNotEmptyWaitMillis
public long getNotEmptyWaitMillis()- Specified by:
getNotEmptyWaitMillis
in interfaceDruidDataSourceMBean
-
getNotEmptyWaitNanos
public long getNotEmptyWaitNanos()- Specified by:
getNotEmptyWaitNanos
in interfaceDruidDataSourceMBean
-
getLockQueueLength
public int getLockQueueLength()- Specified by:
getLockQueueLength
in interfaceDruidDataSourceMBean
-
getActivePeak
public int getActivePeak()- Specified by:
getActivePeak
in interfaceDruidDataSourceMBean
- Specified by:
getActivePeak
in classDruidAbstractDataSource
-
getActivePeakTime
- Specified by:
getActivePeakTime
in interfaceDruidDataSourceMBean
-
dump
- Specified by:
dump
in interfaceDruidDataSourceMBean
-
getErrorCount
public long getErrorCount()- Specified by:
getErrorCount
in interfaceDruidDataSourceMBean
-
toString
-
getPoolingConnectionInfo
-
logTransaction
- Specified by:
logTransaction
in classDruidAbstractDataSource
-
getVersion
- Specified by:
getVersion
in interfaceDruidDataSourceMBean
-
getDataSourceStat
- Specified by:
getDataSourceStat
in interfaceDataSourceProxy
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
cloneDruidDataSource
-
getStatDataForMBean
-
getStatData
-
getSqlStat
-
getSqlStat
-
getSqlStatMap
-
getWallStatMap
-
getWallStatValue
-
getLock
-
isWrapperFor
- Specified by:
isWrapperFor
in interfaceWrapper
- Overrides:
isWrapperFor
in classWrapperAdapter
-
unwrap
- Specified by:
unwrap
in interfaceWrapper
- Overrides:
unwrap
in classWrapperAdapter
-
isLogDifferentThread
public boolean isLogDifferentThread() -
setLogDifferentThread
public void setLogDifferentThread(boolean logDifferentThread) -
tryGetConnection
- Throws:
SQLException
-
fill
- Specified by:
fill
in interfaceDruidDataSourceMBean
- Throws:
SQLException
-
fill
- Specified by:
fill
in interfaceDruidDataSourceMBean
- Throws:
SQLException
-
isFull
public boolean isFull() -
preRegister
- Specified by:
preRegister
in interfaceMBeanRegistration
- Throws:
Exception
-
postRegister
- Specified by:
postRegister
in interfaceMBeanRegistration
-
preDeregister
- Specified by:
preDeregister
in interfaceMBeanRegistration
- Throws:
Exception
-
postDeregister
public void postDeregister()- Specified by:
postDeregister
in interfaceMBeanRegistration
-
isClosed
public boolean isClosed() -
isCheckExecuteTime
public boolean isCheckExecuteTime() -
setCheckExecuteTime
public void setCheckExecuteTime(boolean checkExecuteTime) -
forEach
-