Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

Commit

Permalink
Use a ConcurrentHashMap in JmxReporter.
Browse files Browse the repository at this point in the history
  • Loading branch information
codahale committed Feb 8, 2012
1 parent 72e99e1 commit c5d7470
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -9,8 +9,8 @@
import javax.management.ObjectName;
import javax.management.OperationsException;
import java.lang.management.ManagementFactory;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;

/**
Expand Down Expand Up @@ -378,7 +378,7 @@ ObjectName getObjectName() {
*/
public JmxReporter(MetricsRegistry registry) {
super(registry);
this.registeredBeans = new HashMap<MetricName, ObjectName>();
this.registeredBeans = new ConcurrentHashMap<MetricName, ObjectName>(100);
this.server = ManagementFactory.getPlatformMBeanServer();
}

Expand Down

0 comments on commit c5d7470

Please sign in to comment.