public class RandomDataSourceSelector extends Object implements DataSourceSelector
| Constructor and Description |
|---|
RandomDataSourceSelector(HighAvailableDataSource highAvailableDataSource) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBlacklist(DataSource dataSource) |
DataSource |
get() |
List<DataSource> |
getBlacklist() |
Map<String,DataSource> |
getDataSourceMap() |
RandomDataSourceRecoverThread |
getRecoverThread() |
RandomDataSourceValidateThread |
getValidateThread() |
boolean |
isSame(String name) |
void |
removeBlacklist(DataSource dataSource) |
void |
setTarget(String name) |
public RandomDataSourceSelector(HighAvailableDataSource highAvailableDataSource)
public boolean isSame(String name)
isSame in interface DataSourceSelectorpublic DataSource get()
get in interface DataSourceSelectorpublic void setTarget(String name)
setTarget in interface DataSourceSelectorpublic Map<String,DataSource> getDataSourceMap()
public List<DataSource> getBlacklist()
public void addBlacklist(DataSource dataSource)
public void removeBlacklist(DataSource dataSource)
public RandomDataSourceValidateThread getValidateThread()
public RandomDataSourceRecoverThread getRecoverThread()
Copyright © 2013–2018 Alibaba Group. All rights reserved.