@ -90,25 +90,25 @@ public class CodahaleMetricWriter implements MetricWriter {
@@ -90,25 +90,25 @@ public class CodahaleMetricWriter implements MetricWriter {
}
else{
finaldoublegauge=value.getValue().doubleValue();
Objectlock=null;
if(this.gaugeLocks.containsKey(name)){
lock=this.gaugeLocks.get(name);
}
else{
this.gaugeLocks.putIfAbsent(name,newObject());
lock=this.gaugeLocks.get(name);
}
// Ensure we synchronize to avoid another thread pre-empting this thread after
// remove causing an error in CodaHale metrics
// NOTE: CodaHale provides no way to do this atomically