Search in sources :

Example 1 with DataSourceMonitorWrapper

use of com.navercorp.pinpoint.profiler.context.monitor.DataSourceMonitorWrapper in project pinpoint by naver.

the class DefaultDataSourceMetric method dataSourceList.

@Override
public TDataSourceList dataSourceList() {
    TDataSourceList dataSourceList = new TDataSourceList();
    List<DataSourceMonitorWrapper> dataSourceMonitorList = dataSourceMonitorRegistryService.getPluginMonitorWrapperList();
    if (!CollectionUtils.isEmpty(dataSourceMonitorList)) {
        for (DataSourceMonitorWrapper dataSourceMonitor : dataSourceMonitorList) {
            TDataSource dataSource = collectDataSource(dataSourceMonitor);
            dataSourceList.addToDataSourceList(dataSource);
        }
    } else {
        dataSourceList.setDataSourceList(Collections.<TDataSource>emptyList());
    }
    return dataSourceList;
}
Also used : TDataSourceList(com.navercorp.pinpoint.thrift.dto.TDataSourceList) DataSourceMonitorWrapper(com.navercorp.pinpoint.profiler.context.monitor.DataSourceMonitorWrapper) TDataSource(com.navercorp.pinpoint.thrift.dto.TDataSource)

Aggregations

DataSourceMonitorWrapper (com.navercorp.pinpoint.profiler.context.monitor.DataSourceMonitorWrapper)1 TDataSource (com.navercorp.pinpoint.thrift.dto.TDataSource)1 TDataSourceList (com.navercorp.pinpoint.thrift.dto.TDataSourceList)1