use of com.yahoo.dba.perf.myperf.common.MetricsGroup in project mysql_perf_analyzer by yahoo.
the class MetricsDbBase method addNewUDM.
public boolean addNewUDM(UserDefinedMetrics udm) {
if (udm == null)
return false;
MetricsGroup mg = udm.getMetricsGroup();
if (!createMetricsTable(mg))
return false;
String tblName = mg.getSinkTableName();
synchronized (metricsDefLock) {
if (!this.metricsGroups.containsKey(tblName)) {
this.metricsGroups.put(tblName, mg);
this.dataQueues.put(tblName, new java.util.concurrent.ArrayBlockingQueue<MetricsData>(10000));
this.insertSQL.put(tblName, this.insertSQL(mg));
} else
return false;
}
return true;
}
Aggregations