public class DruidPoolConfiguration extends AbstractPoolConfiguration
DruidAbstractDataSource
构造器和说明 |
---|
DruidPoolConfiguration() |
getDriverClassName, getPassword, getProperties, getUrl, getUsername, setDriverClassName, setPassword, setProperties, setUrl, setUsername
public String getName()
public void setName(String name)
name
- 连接池名称public String getDefaultCatalog()
public void setDefaultCatalog(String defaultCatalog)
defaultCatalog
- 为支持 catalog 概念的数据库设置默认 catalogpublic String getDbTypeName()
public void setDbTypeName(String dbTypeName)
dbTypeName
- 数据库类型名称public ScheduledExecutorService getCreateScheduler()
public void setCreateScheduler(ScheduledExecutorService createScheduler)
public ScheduledExecutorService getDestroyScheduler()
public void setDestroyScheduler(ScheduledExecutorService destroyScheduler)
@Deprecated public Boolean isInitExceptionThrow()
public Boolean getInitExceptionThrow()
public void setInitExceptionThrow(Boolean initExceptionThrow)
public Integer getMaxCreateTaskCount()
public void setMaxCreateTaskCount(Integer maxCreateTaskCount)
public Integer getMaxWaitThreadCount()
public void setMaxWaitThreadCount(Integer maxWaitThreadCount)
public Integer getInitialSize()
public void setInitialSize(Integer initialSize)
initialSize
- 初始化时建立连接的个数public Integer getMaxActive()
public void setMaxActive(Integer maxActive)
maxActive
- 最大连接池数量public Integer getMinIdle()
public void setMinIdle(Integer minIdle)
minIdle
- 最小空闲连接数public Integer getMaxIdle()
public void setMaxIdle(Integer maxIdle)
maxIdle
- 最大空闲连接数public Duration getMaxWait()
public void setMaxWait(Duration maxWait)
maxWait
- 获取连接时最大等待时间public Long getTimeBetweenConnectError()
public void setTimeBetweenConnectError(Long timeBetweenConnectError)
public Integer getConnectionErrorRetryAttempts()
public void setConnectionErrorRetryAttempts(Integer connectionErrorRetryAttempts)
connectionErrorRetryAttempts
- 连接出错重试次数public Collection<String> getConnectionInitSqls()
public void setConnectionInitSqls(Collection<String> connectionInitSqls)
connectionInitSqls
- 在第一次创建时用来初始化物理连接的SQL语句集合@Deprecated public Boolean isAsyncCloseConnectionEnable()
public Boolean getAsyncCloseConnectionEnable()
public void setAsyncCloseConnectionEnable(Boolean asyncCloseConnectionEnable)
@Deprecated public Boolean isAccessToUnderlyingConnectionAllowed()
public Boolean getAccessToUnderlyingConnectionAllowed()
public void setAccessToUnderlyingConnectionAllowed(Boolean accessToUnderlyingConnectionAllowed)
public String getValidationQuery()
public void setValidationQuery(String validationQuery)
validationQuery
- 验证连接使用的 SQLpublic String getValidConnectionCheckerClassName()
public void setValidConnectionCheckerClassName(String validConnectionCheckerClassName)
public Duration getValidationQueryTimeout()
public void setValidationQueryTimeout(Duration validationQueryTimeout)
validationQueryTimeout
- 验证SQL的执行超时时间public Duration getQueryTimeout()
public void setQueryTimeout(Duration queryTimeout)
public Integer getNotFullTimeoutRetryCount()
public void setNotFullTimeoutRetryCount(Integer notFullTimeoutRetryCount)
@Deprecated public Boolean isTestOnBorrow()
public Boolean getTestOnBorrow()
public void setTestOnBorrow(Boolean testOnBorrow)
testOnBorrow
- 从连接池获取一个连接时,是否验证有效性@Deprecated public Boolean isTestOnReturn()
public Boolean getTestOnReturn()
public void setTestOnReturn(Boolean testOnReturn)
testOnReturn
- 连接被归还到连接池时,是否验证有效性@Deprecated public Boolean isTestWhileIdle()
public Boolean getTestWhileIdle()
public void setTestWhileIdle(Boolean testWhileIdle)
testWhileIdle
- 连接空闲时,是否验证有效性public Duration getTimeBetweenEvictionRuns()
public void setTimeBetweenEvictionRuns(Duration timeBetweenEvictionRuns)
timeBetweenEvictionRuns
- 空闲对象驱逐线程运行时的休眠时间public Integer getNumTestsPerEvictionRun()
public void setNumTestsPerEvictionRun(Integer numTestsPerEvictionRun)
numTestsPerEvictionRun
- 在每个空闲对象驱逐线程运行过程中中进行检查的对象个数public Duration getMinEvictableIdleTime()
public void setMinEvictableIdleTime(Duration minEvictableIdleTime)
minEvictableIdleTime
- 空闲的连接被释放最低要待时间public Duration getMaxEvictableIdleTime()
public void setMaxEvictableIdleTime(Duration maxEvictableIdleTime)
public Duration getKeepAliveBetweenTime()
public void setKeepAliveBetweenTime(Duration keepAliveBetweenTime)
public Duration getPhyTimeout()
public void setPhyTimeout(Duration phyTimeout)
public Long getPhyMaxUseCount()
public void setPhyMaxUseCount(Long phyMaxUseCount)
public TransactionIsolation getDefaultTransactionIsolation()
public void setDefaultTransactionIsolation(TransactionIsolation defaultTransactionIsolation)
defaultTransactionIsolation
- 默认事务隔离级别public Long getTransactionThreshold()
public void setTransactionThreshold(Long transactionThreshold)
public Duration getTransactionQueryTimeout()
public void setTransactionQueryTimeout(Duration transactionQueryTimeout)
@Deprecated public Boolean isDefaultAutoCommit()
public Boolean getDefaultAutoCommit()
public void setDefaultAutoCommit(Boolean defaultAutoCommit)
defaultAutoCommit
- 是否自动提交事务@Deprecated public Boolean isDefaultReadOnly()
public Boolean getDefaultReadOnly()
public void setDefaultReadOnly(Boolean defaultReadOnly)
defaultReadOnly
- 连接是否是只读模式@Deprecated public Boolean isPoolPreparedStatements()
public Boolean getPoolPreparedStatements()
public void setPoolPreparedStatements(Boolean poolPreparedStatements)
poolPreparedStatements
- 是否缓存 preparedStatementpublic Integer getMaxOpenPreparedStatements()
public void setMaxOpenPreparedStatements(Integer maxOpenPreparedStatements)
maxOpenPreparedStatements
- 最大打开 PSCache 数@Deprecated public Boolean isSharePreparedStatements()
public Boolean getSharePreparedStatements()
public void setSharePreparedStatements(Boolean sharePreparedStatements)
public Integer getMaxPoolPreparedStatementPerConnectionSize()
public void setMaxPoolPreparedStatementPerConnectionSize(Integer maxPoolPreparedStatementPerConnectionSize)
@Deprecated public Boolean isClearFiltersEnable()
public Boolean getClearFiltersEnable()
public void setClearFiltersEnable(Boolean clearFiltersEnable)
public String getExceptionSorterClassName()
ExceptionSorter
实例名称ExceptionSorter
实例名称public void setExceptionSorterClassName(String exceptionSorterClassName)
ExceptionSorter
实例名称exceptionSorterClassName
- ExceptionSorter
实例名称public com.alibaba.druid.pool.DruidDataSourceStatLogger getStatLogger()
public void setStatLogger(com.alibaba.druid.pool.DruidDataSourceStatLogger statLogger)
public Duration getTimeBetweenLogStats()
public void setTimeBetweenLogStats(Duration timeBetweenLogStats)
@Deprecated public Boolean isRemoveAbandoned()
public Boolean getRemoveAbandoned()
public void setRemoveAbandoned(Boolean removeAbandoned)
removeAbandoned
- 是否移除抛弃的(abandoned)连接public Duration getRemoveAbandonedTimeout()
public void setRemoveAbandonedTimeout(Duration removeAbandonedTimeout)
removeAbandonedTimeout
- 一个连接使用超过多久就视为抛弃的,该值应该超过你的应用中最长的SQL可能运行的时间@Deprecated public Boolean isLogAbandoned()
public Boolean getLogAbandoned()
public void setLogAbandoned(Boolean logAbandoned)
logAbandoned
- 是否记录抛弃连接的应用的堆栈信息@Deprecated public Boolean isUseOracleImplicitCache()
public Boolean getUseOracleImplicitCache()
public void setUseOracleImplicitCache(Boolean useOracleImplicitCache)
@Deprecated public Boolean isInitVariants()
public Boolean getInitVariants()
public void setInitVariants(Boolean initVariants)
@Deprecated public Boolean isInitGlobalVariants()
public Boolean getInitGlobalVariants()
public void setInitGlobalVariants(Boolean initGlobalVariants)
@Deprecated public Boolean isFailFast()
public Boolean getFailFast()
public void setFailFast(Boolean failFast)
public Integer getOnFatalErrorMaxActive()
public void setOnFatalErrorMaxActive(Integer onFatalErrorMaxActive)
@Deprecated public Boolean isBreakAfterAcquireFailure()
public Boolean getBreakAfterAcquireFailure()
public void setBreakAfterAcquireFailure(Boolean breakAfterAcquireFailure)
@Deprecated public Boolean isDupCloseLogEnable()
public Boolean getDupCloseLogEnable()
public void setDupCloseLogEnable(Boolean dupCloseLogEnable)
public Boolean getUseUnfairLock()
public void setUseUnfairLock(Boolean useUnfairLock)
@Deprecated public Boolean isUseLocalSessionState()
public Boolean getUseLocalSessionState()
public void setUseLocalSessionState(Boolean useLocalSessionState)
public ObjectName getObjectName()
public void setObjectName(ObjectName objectName)
Copyright © 2022 buession.com Inc.. All rights reserved.