Commit 99cd9bdc authored by izeye's avatar izeye Committed by Stephane Nicoll

Fix typo

Closes gh-3416
parent b81c6398
......@@ -94,16 +94,16 @@ public class DropwizardMetricWriter implements MetricWriter {
else {
final double gauge = value.getValue().doubleValue();
// 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
synchronized (getGuageLock(name)) {
// remove causing an error in Dropwizard Metrics
// NOTE: Dropwizard Metrics provides no way to do this atomically
synchronized (getGaugeLock(name)) {
this.registry.remove(name);
this.registry.register(name, new SimpleGauge(gauge));
}
}
}
private Object getGuageLock(String name) {
private Object getGaugeLock(String name) {
Object lock = this.gaugeLocks.get(name);
if (lock == null) {
Object newLock = new Object();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment