*/
public void accumulateStoreMetric(final Map<String, MutableDouble> tmpMap,
StoreMetricType storeMetricType, double val) {
final String key = getStoreMetricName(storeMetricType);
if (tmpMap.get(key) == null) {
tmpMap.put(key, new MutableDouble(val));
} else {
tmpMap.get(key).add(val);
}
if (this == ALL_SCHEMA_METRICS) {
// also compute the max value across all Stores on this server
final String maxKey = getStoreMetricNameMax(storeMetricType);
MutableDouble cur = tmpMap.get(maxKey);
if (cur == null) {
tmpMap.put(maxKey, new MutableDouble(val));
} else if (cur.doubleValue() < val) {
cur.setValue(val);
}
} else {
ALL_SCHEMA_METRICS.accumulateStoreMetric(tmpMap, storeMetricType, val);
}
}