public class RandomDataSourceSelector extends Object implements DataSourceSelector
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
PROP_BLACKLIST_THRESHOLD |
static String |
PROP_CHECKING_INTERVAL |
static String |
PROP_RECOVERY_INTERVAL |
static String |
PROP_VALIDATION_SLEEP |
| 构造器和说明 |
|---|
RandomDataSourceSelector(HighAvailableDataSource highAvailableDataSource) |
public RandomDataSourceSelector(HighAvailableDataSource highAvailableDataSource)
public void init()
DataSourceSelectorinit 在接口中 DataSourceSelectorpublic void destroy()
destroy 在接口中 DataSourceSelectorpublic String getName()
DataSourceSelectorgetName 在接口中 DataSourceSelectorpublic DataSource get()
DataSourceSelectorget 在接口中 DataSourceSelectorpublic void setTarget(String name)
DataSourceSelectorsetTarget 在接口中 DataSourceSelectorpublic Map<String,DataSource> getFullDataSourceMap()
public Map<String,DataSource> getDataSourceMap()
public List<DataSource> getBlacklist()
public boolean containInBlacklist(DataSource dataSource)
public void addBlacklist(DataSource dataSource)
public void removeBlacklist(DataSource dataSource)
public HighAvailableDataSource getHighAvailableDataSource()
public RandomDataSourceValidateThread getValidateThread()
public void setValidateThread(RandomDataSourceValidateThread validateThread)
public RandomDataSourceRecoverThread getRecoverThread()
public void setRecoverThread(RandomDataSourceRecoverThread recoverThread)
public int getCheckingIntervalSeconds()
public void setCheckingIntervalSeconds(int checkingIntervalSeconds)
public int getRecoveryIntervalSeconds()
public void setRecoveryIntervalSeconds(int recoveryIntervalSeconds)
public int getValidationSleepSeconds()
public void setValidationSleepSeconds(int validationSleepSeconds)
public int getBlacklistThreshold()
public void setBlacklistThreshold(int blacklistThreshold)
Copyright © 2013–2023. All rights reserved.