类 RandomDataSourceSelector
java.lang.Object
com.alibaba.druid.pool.ha.selector.RandomDataSourceSelector
- 所有已实现的接口:
DataSourceSelector
- 直接已知子类:
StickyRandomDataSourceSelector
A selector which uses java.util.Random to choose DataSource.
- 作者:
- DigitalSonic
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddBlacklist(DataSource dataSource) booleancontainInBlacklist(DataSource dataSource) voiddestroy()Interrupt Threads if needed.get()Return a DataSource according to the implemention.intintgetName()Return the name of this DataSourceSelector.intintvoidinit()Init the DataSourceSelector before use it.voidremoveBlacklist(DataSource dataSource) voidsetBlacklistThreshold(int blacklistThreshold) voidsetCheckingIntervalSeconds(int checkingIntervalSeconds) voidsetRecoverThread(RandomDataSourceRecoverThread recoverThread) voidsetRecoveryIntervalSeconds(int recoveryIntervalSeconds) voidSet the target DataSource name to return.voidsetValidateThread(RandomDataSourceValidateThread validateThread) voidsetValidationSleepSeconds(int validationSleepSeconds)
-
字段详细资料
-
构造器详细资料
-
RandomDataSourceSelector
-
-
方法详细资料
-
init
public void init()从接口复制的说明:DataSourceSelectorInit the DataSourceSelector before use it.- 指定者:
init在接口中DataSourceSelector
-
destroy
public void destroy()Interrupt Threads if needed.- 指定者:
destroy在接口中DataSourceSelector
-
getName
从接口复制的说明:DataSourceSelectorReturn the name of this DataSourceSelector. e.g. byName- 指定者:
getName在接口中DataSourceSelector
-
get
从接口复制的说明:DataSourceSelectorReturn a DataSource according to the implemention.- 指定者:
get在接口中DataSourceSelector
-
setTarget
从接口复制的说明:DataSourceSelectorSet the target DataSource name to return. Wether to use this or not, it's decided by the implemention.- 指定者:
setTarget在接口中DataSourceSelector
-
getFullDataSourceMap
-
getDataSourceMap
-
getBlacklist
-
containInBlacklist
-
addBlacklist
-
removeBlacklist
-
getHighAvailableDataSource
-
getValidateThread
-
setValidateThread
-
getRecoverThread
-
setRecoverThread
-
getCheckingIntervalSeconds
public int getCheckingIntervalSeconds() -
setCheckingIntervalSeconds
public void setCheckingIntervalSeconds(int checkingIntervalSeconds) -
getRecoveryIntervalSeconds
public int getRecoveryIntervalSeconds() -
setRecoveryIntervalSeconds
public void setRecoveryIntervalSeconds(int recoveryIntervalSeconds) -
getValidationSleepSeconds
public int getValidationSleepSeconds() -
setValidationSleepSeconds
public void setValidationSleepSeconds(int validationSleepSeconds) -
getBlacklistThreshold
public int getBlacklistThreshold() -
setBlacklistThreshold
public void setBlacklistThreshold(int blacklistThreshold)
-