类 RandomDataSourceValidateThread
java.lang.Object
com.alibaba.druid.pool.ha.selector.RandomDataSourceValidateThread
- 所有已实现的接口:
Runnable
A Thread trying to test all DataSource provided by HADataSource.
If a DataSource failed this test for 3 times (default value), it will be put into a blacklist.
- 作者:
- DigitalSonic
-
字段概要
字段修饰符和类型字段说明static final intstatic final int -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明intintintstatic voidlogSuccessTime(DataSourceProxy dataSource) Provide a static method to record the last success time of a DataSourcevoidrun()voidsetBlacklistThreshold(int blacklistThreshold) voidsetCheckingIntervalSeconds(int checkingIntervalSeconds) voidsetSelector(RandomDataSourceSelector selector) voidsetValidationSleepSeconds(int validationSleepSeconds)
-
字段详细资料
-
构造器详细资料
-
RandomDataSourceValidateThread
-
-
方法详细资料
-
logSuccessTime
Provide a static method to record the last success time of a DataSource -
run
public void run() -
getCheckingIntervalSeconds
public int getCheckingIntervalSeconds() -
setCheckingIntervalSeconds
public void setCheckingIntervalSeconds(int checkingIntervalSeconds) -
getValidationSleepSeconds
public int getValidationSleepSeconds() -
setValidationSleepSeconds
public void setValidationSleepSeconds(int validationSleepSeconds) -
getBlacklistThreshold
public int getBlacklistThreshold() -
setBlacklistThreshold
public void setBlacklistThreshold(int blacklistThreshold) -
getSelector
-
setSelector
-