use of com.alibaba.druid.proxy.jdbc.DataSourceProxyImpl in project druid by alibaba.
the class JdbcStatManager method getDataSourceList.
@Override
public TabularData getDataSourceList() throws JMException {
CompositeType rowType = getDataSourceCompositeType();
String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]);
TabularType tabularType = new TabularType("DataSourceStat", "DataSourceStat", rowType, indexNames);
TabularData data = new TabularDataSupport(tabularType);
{
final ConcurrentMap<String, DataSourceProxyImpl> dataSources = DruidDriver.getProxyDataSources();
for (DataSourceProxyImpl dataSource : dataSources.values()) {
data.put(dataSource.getCompositeData());
}
}
final Set<DruidDataSource> dataSources = DruidDataSourceStatManager.getDruidDataSourceInstances();
for (DruidDataSource dataSource : dataSources) {
data.put(dataSource.getCompositeData());
}
return data;
}
Aggregations