test_class.file: stagemonitor-core/src/test/java/org/stagemonitor/core/metrics/metrics2/Metric2RegistryTest.java
test_class.identifier: Metric2RegistryTest
test_case.body: @Test(expected = IllegalArgumentException.class)
  	public void testDuplicateMetricNameEndsWithIllegalArgumentException() {
  		Metric2Registry registry = new Metric2Registry();
  		MetricName metric1 = MetricName.name("test").build();
  		registry.register(metric1, getGauge());
  		registry.register(metric1, getMetered());
  	}
test_case.class_method_signature: Metric2RegistryTest.testDuplicateMetricNameEndsWithIllegalArgumentException()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) public void testDuplicateMetricNameEndsWithIllegalArgumentException()
test_case.identifier: testDuplicateMetricNameEndsWithIllegalArgumentException
test_case.invocations: build name register getGauge register getMetered
test_case.modifiers: @Test(expected = IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDuplicateMetricNameEndsWithIllegalArgumentException()
focal_class.declarator: metrics = new ConcurrentHashMap<MetricName, Metric>()
focal_class.modifier: private final
focal_class.original_string: private final ConcurrentMap<MetricName, Metric> metrics = new ConcurrentHashMap<MetricName, Metric>();
focal_class.type: ConcurrentMap<MetricName, Metric>
focal_class.var_name: metrics
focal_class.declarator: metricRegistry
focal_class.modifier: private final
focal_class.original_string: private final MetricRegistry metricRegistry;
focal_class.type: MetricRegistry
focal_class.var_name: metricRegistry
focal_class.file: stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/metrics2/Metric2Registry.java
focal_class.identifier: Metric2Registry
focal_class.interfaces: implements Metric2Set
focal_class.class_method_signature: Metric2Registry.Metric2Registry()
focal_class.full_signature: public  Metric2Registry()
focal_class.identifier: Metric2Registry
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Metric2Registry()
focal_class.class_method_signature: Metric2Registry.Metric2Registry(MetricRegistry metricRegistry)
focal_class.full_signature: public  Metric2Registry(MetricRegistry metricRegistry)
focal_class.identifier: Metric2Registry
focal_class.modifiers: public
focal_class.parameters: (MetricRegistry metricRegistry)
focal_class.signature:  Metric2Registry(MetricRegistry metricRegistry)
focal_class.class_method_signature: Metric2Registry.register(MetricName name, T metric)
focal_class.full_signature: @SuppressWarnings("unchecked") public T register(MetricName name, T metric)
focal_class.identifier: register
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (MetricName name, T metric)
focal_class.return: T
focal_class.signature: T register(MetricName name, T metric)
focal_class.class_method_signature: Metric2Registry.registerAll(Metric2Set metrics)
focal_class.full_signature: public void registerAll(Metric2Set metrics)
focal_class.identifier: registerAll
focal_class.modifiers: public
focal_class.parameters: (Metric2Set metrics)
focal_class.return: void
focal_class.signature: void registerAll(Metric2Set metrics)
focal_class.class_method_signature: Metric2Registry.registerAny(Metric2Set metrics)
focal_class.full_signature: public void registerAny(Metric2Set metrics)
focal_class.identifier: registerAny
focal_class.modifiers: public
focal_class.parameters: (Metric2Set metrics)
focal_class.return: void
focal_class.signature: void registerAny(Metric2Set metrics)
focal_class.class_method_signature: Metric2Registry.registerNewMetrics(MetricName name, Metric metric)
focal_class.full_signature: public void registerNewMetrics(MetricName name, Metric metric)
focal_class.identifier: registerNewMetrics
focal_class.modifiers: public
focal_class.parameters: (MetricName name, Metric metric)
focal_class.return: void
focal_class.signature: void registerNewMetrics(MetricName name, Metric metric)
focal_class.class_method_signature: Metric2Registry.counter(MetricName name)
focal_class.full_signature: public Counter counter(MetricName name)
focal_class.identifier: counter
focal_class.modifiers: public
focal_class.parameters: (MetricName name)
focal_class.return: Counter
focal_class.signature: Counter counter(MetricName name)
focal_class.class_method_signature: Metric2Registry.histogram(MetricName name)
focal_class.full_signature: public Histogram histogram(MetricName name)
focal_class.identifier: histogram
focal_class.modifiers: public
focal_class.parameters: (MetricName name)
focal_class.return: Histogram
focal_class.signature: Histogram histogram(MetricName name)
focal_class.class_method_signature: Metric2Registry.meter(MetricName name)
focal_class.full_signature: public Meter meter(MetricName name)
focal_class.identifier: meter
focal_class.modifiers: public
focal_class.parameters: (MetricName name)
focal_class.return: Meter
focal_class.signature: Meter meter(MetricName name)
focal_class.class_method_signature: Metric2Registry.timer(MetricName name)
focal_class.full_signature: public Timer timer(MetricName name)
focal_class.identifier: timer
focal_class.modifiers: public
focal_class.parameters: (MetricName name)
focal_class.return: Timer
focal_class.signature: Timer timer(MetricName name)
focal_class.class_method_signature: Metric2Registry.remove(MetricName name)
focal_class.full_signature: public boolean remove(MetricName name)
focal_class.identifier: remove
focal_class.modifiers: public
focal_class.parameters: (MetricName name)
focal_class.return: boolean
focal_class.signature: boolean remove(MetricName name)
focal_class.class_method_signature: Metric2Registry.getNames()
focal_class.full_signature: public Set<MetricName> getNames()
focal_class.identifier: getNames
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<MetricName>
focal_class.signature: Set<MetricName> getNames()
focal_class.class_method_signature: Metric2Registry.getGauges()
focal_class.full_signature: public Map<MetricName, Gauge> getGauges()
focal_class.identifier: getGauges
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<MetricName, Gauge>
focal_class.signature: Map<MetricName, Gauge> getGauges()
focal_class.class_method_signature: Metric2Registry.getGauges(Metric2Filter filter)
focal_class.full_signature: public Map<MetricName, Gauge> getGauges(Metric2Filter filter)
focal_class.identifier: getGauges
focal_class.modifiers: public
focal_class.parameters: (Metric2Filter filter)
focal_class.return: Map<MetricName, Gauge>
focal_class.signature: Map<MetricName, Gauge> getGauges(Metric2Filter filter)
focal_class.class_method_signature: Metric2Registry.getCounters()
focal_class.full_signature: public Map<MetricName, Counter> getCounters()
focal_class.identifier: getCounters
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<MetricName, Counter>
focal_class.signature: Map<MetricName, Counter> getCounters()
focal_class.class_method_signature: Metric2Registry.getCounters(Metric2Filter filter)
focal_class.full_signature: public Map<MetricName, Counter> getCounters(Metric2Filter filter)
focal_class.identifier: getCounters
focal_class.modifiers: public
focal_class.parameters: (Metric2Filter filter)
focal_class.return: Map<MetricName, Counter>
focal_class.signature: Map<MetricName, Counter> getCounters(Metric2Filter filter)
focal_class.class_method_signature: Metric2Registry.getHistograms()
focal_class.full_signature: public Map<MetricName, Histogram> getHistograms()
focal_class.identifier: getHistograms
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<MetricName, Histogram>
focal_class.signature: Map<MetricName, Histogram> getHistograms()
focal_class.class_method_signature: Metric2Registry.getHistograms(Metric2Filter filter)
focal_class.full_signature: public Map<MetricName, Histogram> getHistograms(Metric2Filter filter)
focal_class.identifier: getHistograms
focal_class.modifiers: public
focal_class.parameters: (Metric2Filter filter)
focal_class.return: Map<MetricName, Histogram>
focal_class.signature: Map<MetricName, Histogram> getHistograms(Metric2Filter filter)
focal_class.class_method_signature: Metric2Registry.getMeters()
focal_class.full_signature: public Map<MetricName, Meter> getMeters()
focal_class.identifier: getMeters
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<MetricName, Meter>
focal_class.signature: Map<MetricName, Meter> getMeters()
focal_class.class_method_signature: Metric2Registry.getMeters(Metric2Filter filter)
focal_class.full_signature: public Map<MetricName, Meter> getMeters(Metric2Filter filter)
focal_class.identifier: getMeters
focal_class.modifiers: public
focal_class.parameters: (Metric2Filter filter)
focal_class.return: Map<MetricName, Meter>
focal_class.signature: Map<MetricName, Meter> getMeters(Metric2Filter filter)
focal_class.class_method_signature: Metric2Registry.getTimers()
focal_class.full_signature: public Map<MetricName, Timer> getTimers()
focal_class.identifier: getTimers
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<MetricName, Timer>
focal_class.signature: Map<MetricName, Timer> getTimers()
focal_class.class_method_signature: Metric2Registry.getTimers(Metric2Filter filter)
focal_class.full_signature: public Map<MetricName, Timer> getTimers(Metric2Filter filter)
focal_class.identifier: getTimers
focal_class.modifiers: public
focal_class.parameters: (Metric2Filter filter)
focal_class.return: Map<MetricName, Timer>
focal_class.signature: Map<MetricName, Timer> getTimers(Metric2Filter filter)
focal_class.class_method_signature: Metric2Registry.getOrAdd(MetricName name, MetricBuilder<T> builder)
focal_class.full_signature: @SuppressWarnings("unchecked") private T getOrAdd(MetricName name, MetricBuilder<T> builder)
focal_class.identifier: getOrAdd
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (MetricName name, MetricBuilder<T> builder)
focal_class.return: T
focal_class.signature: T getOrAdd(MetricName name, MetricBuilder<T> builder)
focal_class.class_method_signature: Metric2Registry.getMetrics(Class<T> klass, Metric2Filter filter)
focal_class.full_signature: @SuppressWarnings("unchecked") private Map<MetricName, T> getMetrics(Class<T> klass, Metric2Filter filter)
focal_class.identifier: getMetrics
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (Class<T> klass, Metric2Filter filter)
focal_class.return: Map<MetricName, T>
focal_class.signature: Map<MetricName, T> getMetrics(Class<T> klass, Metric2Filter filter)
focal_class.class_method_signature: Metric2Registry.getMetrics(Class<T> klass, MetricFilter filter)
focal_class.full_signature: @SuppressWarnings("unchecked") protected Map<MetricName, T> getMetrics(Class<T> klass, MetricFilter filter)
focal_class.identifier: getMetrics
focal_class.modifiers: @SuppressWarnings("unchecked") protected
focal_class.parameters: (Class<T> klass, MetricFilter filter)
focal_class.return: Map<MetricName, T>
focal_class.signature: Map<MetricName, T> getMetrics(Class<T> klass, MetricFilter filter)
focal_class.class_method_signature: Metric2Registry.getMetrics()
focal_class.full_signature: @Override public Map<MetricName, Metric> getMetrics()
focal_class.identifier: getMetrics
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<MetricName, Metric>
focal_class.signature: Map<MetricName, Metric> getMetrics()
focal_class.class_method_signature: Metric2Registry.removeMatching(MetricFilter filter)
focal_class.full_signature: public void removeMatching(MetricFilter filter)
focal_class.identifier: removeMatching
focal_class.modifiers: public
focal_class.parameters: (MetricFilter filter)
focal_class.return: void
focal_class.signature: void removeMatching(MetricFilter filter)
focal_class.class_method_signature: Metric2Registry.removeMatching(Metric2Filter filter)
focal_class.full_signature: public void removeMatching(Metric2Filter filter)
focal_class.identifier: removeMatching
focal_class.modifiers: public
focal_class.parameters: (Metric2Filter filter)
focal_class.return: void
focal_class.signature: void removeMatching(Metric2Filter filter)
focal_class.class_method_signature: Metric2Registry.getMetricRegistry()
focal_class.full_signature: public MetricRegistry getMetricRegistry()
focal_class.identifier: getMetricRegistry
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: MetricRegistry
focal_class.signature: MetricRegistry getMetricRegistry()
focal_method.body: @SuppressWarnings("unchecked")
  	public <T extends Metric> T register(MetricName name, T metric) throws IllegalArgumentException {
  		if (metric instanceof MetricSet) {
  			throw new IllegalArgumentException("This metrics registry is not compatible with MetricSets. Use a Metric2Set instead.");
  		} else {
  			final Metric existing = metrics.putIfAbsent(name, metric);
  			if (existing != null) {
  				throw new IllegalArgumentException("A metric named " + name + " already exists");
  			}
  			else {
  				// This is a new metric - we have to register the Metric with
  				// the legacy Dropwizard Metric registry as
  				// well to support existing reports and listeners
  				metricRegistry.register(name.toGraphiteName(), metric);
  			}
  		}
  		return metric;
  	}
focal_method.class_method_signature: Metric2Registry.register(MetricName name, T metric)
focal_method.full_signature: @SuppressWarnings("unchecked") public T register(MetricName name, T metric)
focal_method.identifier: register
focal_method.invocations: putIfAbsent register toGraphiteName
focal_method.modifiers: @SuppressWarnings("unchecked") public
focal_method.parameters: (MetricName name, T metric)
focal_method.return: T
focal_method.signature: T register(MetricName name, T metric)