| 限定符和类型 | 字段和说明 |
|---|---|
private int |
blacklistThreshold |
private ExecutorService |
checkExecutor |
private int |
checkingIntervalSeconds |
private Map<String,Integer> |
errorCounts |
private static Log |
LOG |
private RandomDataSourceSelector |
selector |
private int |
validationSleepSeconds |
| 构造器和说明 |
|---|
RandomDataSourceValidateThread(RandomDataSourceSelector selector) |
| 限定符和类型 | 方法和说明 |
|---|---|
private boolean |
check(String name,
DruidDataSource dataSource) |
private void |
checkAllDataSources() |
int |
getBlacklistThreshold() |
int |
getCheckingIntervalSeconds() |
int |
getValidationSleepSeconds() |
private void |
maintainBlacklist() |
void |
run() |
void |
setBlacklistThreshold(int blacklistThreshold) |
void |
setCheckingIntervalSeconds(int checkingIntervalSeconds) |
void |
setValidationSleepSeconds(int validationSleepSeconds) |
private void |
sleepBeforeValidation() |
private void |
sleepForNextValidation() |
private static final Log LOG
private int checkingIntervalSeconds
private int validationSleepSeconds
private int blacklistThreshold
private RandomDataSourceSelector selector
private ExecutorService checkExecutor
public RandomDataSourceValidateThread(RandomDataSourceSelector selector)
private void sleepForNextValidation()
private void maintainBlacklist()
private void checkAllDataSources()
private boolean check(String name, DruidDataSource dataSource)
private void sleepBeforeValidation()
public int getCheckingIntervalSeconds()
public void setCheckingIntervalSeconds(int checkingIntervalSeconds)
public int getValidationSleepSeconds()
public void setValidationSleepSeconds(int validationSleepSeconds)
public int getBlacklistThreshold()
public void setBlacklistThreshold(int blacklistThreshold)
Copyright © 2013–2019 Alibaba Group. All rights reserved.