Class GroupDataSource
java.lang.Object
com.baomidou.dynamic.datasource.ds.GroupDataSource
组数据源
- Author:
- TaoYu
-
Constructor Summary
ConstructorsConstructorDescriptionGroupDataSource(String groupName, DynamicDataSourceStrategy dynamicDataSourceStrategy) -
Method Summary
Modifier and TypeMethodDescriptionaddDatasource(String ds, DataSource dataSource) add a new datasource to this groupdetermineDataSourcedetermineDsKeyintsize()size of this group
-
Constructor Details
-
GroupDataSource
-
-
Method Details
-
addDatasource
add a new datasource to this group- Parameters:
ds- the name of the datasourcedataSource- datasource- Returns:
- the previous value associated with ds, or null if there was no mapping for ds.
-
removeDatasource
- Parameters:
ds- the name of the datasource
-
determineDsKey
determineDsKey- Returns:
- the name of the datasource
-
determineDataSource
determineDataSource- Returns:
- the datasource
-
size
public int size()size of this group- Returns:
- the size of this group
-