private ServerConfigManager m_configManager;
public static final String TUAN_TOU = "TuanGou";
private Segment buildAllSegmentsInfo(DependencyReport report) {
Segment result = new Segment();
Map<Integer, Segment> segments = report.getSegments();
DependencyReportMerger merger = new DependencyReportMerger(null);
for (Segment segment : segments.values()) {
Map<String, Dependency> dependencies = segment.getDependencies();
Map<String, Index> indexs = segment.getIndexs();
for (Index index : indexs.values()) {
Index temp = result.findOrCreateIndex(index.getName());
merger.mergeIndex(temp, index);
}
for (Dependency dependency : dependencies.values()) {
Dependency temp = result.findOrCreateDependency(dependency.getKey());
merger.mergeDependency(temp, dependency);
}
}
return result;