Class RandomDataSourceValidateThread
- java.lang.Object
-
- com.alibaba.druid.pool.ha.selector.RandomDataSourceValidateThread
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_BLACKLIST_THRESHOLDstatic intDEFAULT_CHECKING_INTERVAL_SECONDS
-
Constructor Summary
Constructors Constructor Description RandomDataSourceValidateThread(RandomDataSourceSelector selector)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBlacklistThreshold()intgetCheckingIntervalSeconds()RandomDataSourceSelectorgetSelector()intgetValidationSleepSeconds()static 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)
-
-
-
Field Detail
-
DEFAULT_CHECKING_INTERVAL_SECONDS
public static final int DEFAULT_CHECKING_INTERVAL_SECONDS
- See Also:
- Constant Field Values
-
DEFAULT_BLACKLIST_THRESHOLD
public static final int DEFAULT_BLACKLIST_THRESHOLD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RandomDataSourceValidateThread
public RandomDataSourceValidateThread(RandomDataSourceSelector selector)
-
-
Method Detail
-
logSuccessTime
public static void logSuccessTime(DataSourceProxy dataSource)
Provide a static method to record the last success time of a DataSource
-
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
public RandomDataSourceSelector getSelector()
-
setSelector
public void setSelector(RandomDataSourceSelector selector)
-
-