public class DruidDataSourceProvider extends com.alibaba.druid.pool.DruidDataSource implements IDataSourceProvider
com.alibaba.druid.pool.DruidDataSource.CreateConnectionTask, com.alibaba.druid.pool.DruidDataSource.CreateConnectionThread, com.alibaba.druid.pool.DruidDataSource.DestroyConnectionThread, com.alibaba.druid.pool.DruidDataSource.DestroyTask, com.alibaba.druid.pool.DruidDataSource.LogStatsThreadcheckExecuteTime, connectErrorCountUpdater, createTaskIdSeedUpdater, dataSourceStat, instanceKey, killWhenSocketReadTimeout, recycleErrorCountUpdater, resetCountUpdater, waitNanosLocalaccessToUnderlyingConnectionAllowed, activeConnectionLock, activeConnections, breakAfterAcquireFailure, cachedPreparedStatementCount, cachedPreparedStatementDeleteCount, cachedPreparedStatementHitCount, cachedPreparedStatementMissCount, closedPreparedStatementCount, commitCount, connectionErrorRetryAttempts, connectionIdSeed, connectionInitSqls, connectProperties, 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_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, 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, notEmpty, notFullTimeoutRetryCount, numTestsPerEvictionRun, onFatalError, onFatalErrorMaxActive, password, passwordCallback, phyMaxUseCount, phyTimeoutMillis, poolPreparedStatements, preparedStatementCount, PRESENT, queryTimeout, removeAbandoned, removeAbandonedTimeoutMillis, resultSetIdSeed, rollbackCount, sharePreparedStatements, startTransactionCount, statementIdSeed, statLogger, testOnBorrow, testOnReturn, testWhileIdle, timeBetweenConnectErrorMillis, timeBetweenEvictionRunsMillis, timeBetweenLogStatsMillis, transactionHistogram, transactionIdSeed, transactionQueryTimeout, transactionThresholdMillis, useOracleImplicitCache, userCallback, username, validationQuery, validationQueryTimeout, validConnectionChecker| Constructor and Description |
|---|
DruidDataSourceProvider(com.alibaba.druid.pool.DruidDataSource dataSource) |
DruidDataSourceProvider(String url,
String username,
String password) |
DruidDataSourceProvider(String url,
String username,
String password,
String driverClass) |
DruidDataSourceProvider(String url,
String username,
String password,
String driverClass,
String filters) |
| Modifier and Type | Method and Description |
|---|---|
com.alibaba.druid.pool.DruidDataSource |
cloneDruidDataSource() |
boolean |
destroy()
Destroy the provider
|
DataSource |
getDataSource()
Returns provider's dataSource
|
String |
getProviderName() |
void |
set(int initialSize,
int minIdle,
int maxActive) |
void |
setConnectionInitSqls(String... sqls) |
void |
setFilters(String filters) |
void |
setProviderName(String name) |
void |
setPublicKey(String publicKey) |
boolean |
startProviding()
start the provider
|
clearStatementCache, clone, close, configFromPropety, createAndStartCreatorThread, createAndStartDestroyThread, discardConnection, discardConnection, dump, fill, fill, forEach, getActiveCount, getActivePeak, getActivePeakTime, getCloseCount, getConnectCount, getConnectErrorCount, getConnection, getConnection, getConnection, getConnectionDirect, getCreateCount, getDataSourceStat, getDestroyCount, getDiscardCount, getErrorCount, getFilterClassNames, getInitStackTrace, getLock, getLockQueueLength, getNotEmptySignalCount, getNotEmptyWaitCount, getNotEmptyWaitMillis, getNotEmptyWaitNanos, getNotEmptyWaitThreadCount, getNotEmptyWaitThreadPeak, getPooledConnection, getPooledConnection, getPoolingConnectionInfo, getPoolingCount, getPoolingPeak, getPoolingPeakTime, getProperties, getRawDriverMajorVersion, getRawDriverMinorVersion, getRecycleCount, getRecycleErrorCount, getReference, getRemoveAbandonedCount, getResetCount, getSqlStat, getSqlStat, getSqlStatMap, getStatData, getStatDataForMBean, getStatValueAndReset, getVersion, getWaitThreadCount, getWallStatMap, getWallStatValue, handleConnectionException, handleFatalError, init, initCheck, isAsyncInit, isCheckExecuteTime, isClosed, isEnable, isFull, isKeepAlive, isKillWhenSocketReadTimeout, isLogDifferentThread, isMbeanRegistered, isResetStatEnable, isUseGlobalDataSourceStat, isWrapperFor, logStats, logTransaction, postDeregister, postRegister, preDeregister, preRegister, put, recycle, registerMbean, removeAbandoned, resetStat, resolveDriver, restart, setAsyncInit, setCheckExecuteTime, setConnectProperties, setEnable, setKeepAlive, setKillWhenSocketReadTimeout, setLogDifferentThread, setMaxActive, setPoolPreparedStatements, setResetStatEnable, setUseGlobalDataSourceStat, shrink, shrink, shrink, toString, tryGetConnection, unregisterMbean, unwrapaddConnectionProperty, 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, 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, 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, isUseUnfairLock, setAccessToUnderlyingConnectionAllowed, setAsyncCloseConnectionEnable, setBreakAfterAcquireFailure, setClearFiltersEnable, setConnectionErrorRetryAttempts, setConnectionInitSqls, setConnectionProperties, setCreateError, setCreateScheduler, setDbType, setDbType, setDefaultAutoCommit, setDefaultCatalog, setDefaultReadOnly, setDefaultTransactionIsolation, setDestroyScheduler, setDriver, setDriverClassLoader, setDriverClassName, setDupCloseLogEnable, setExceptionSorter, setExceptionSorter, setExceptionSorterClassName, setFailContinuous, setFailFast, 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, setStatLogger, setStatLoggerClassName, setTestOnBorrow, setTestOnReturn, setTestWhileIdle, setTimeBetweenConnectErrorMillis, setTimeBetweenEvictionRunsMillis, setTimeBetweenLogStatsMillis, setTransactionQueryTimeout, setTransactionThresholdMillis, setUrl, setUseLocalSessionState, setUseOracleImplicitCache, setUserCallback, setUsername, setUseUnfairLock, setValidationQuery, setValidationQueryTimeout, setValidConnectionChecker, setValidConnectionCheckerClassName, testConnectionInternal, testConnectionInternal, validateConnectionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetObjectName, getTimeBetweenLogStatsMillis, getUrl, setConnectionProperties, setStatLoggerClassName, setTimeBetweenLogStatsMillisgetActiveConnectionStackTrace, 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, setUseOracleImplicitCachegetObjectName, setObjectNamegetLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriterpublic DruidDataSourceProvider(com.alibaba.druid.pool.DruidDataSource dataSource)
public DruidDataSourceProvider(String url, String username, String password)
public DruidDataSourceProvider(String url, String username, String password, String driverClass)
public void setProviderName(String name)
public void set(int initialSize,
int minIdle,
int maxActive)
public void setPublicKey(String publicKey)
public void setConnectionInitSqls(String... sqls)
public void setFilters(String filters)
setFilters in class com.alibaba.druid.pool.DruidAbstractDataSourcepublic boolean startProviding()
startProviding in interface IDataSourceProviderpublic boolean destroy()
destroy in interface IDataSourceProviderpublic DataSource getDataSource()
getDataSource in interface IDataSourceProviderpublic String getProviderName()
getProviderName in interface IDataSourceProviderpublic com.alibaba.druid.pool.DruidDataSource cloneDruidDataSource()
cloneDruidDataSource in class com.alibaba.druid.pool.DruidDataSourceCopyright © 2021. All rights reserved.