Beispiel #1
0
 /**
  * Registers a Source.
  *
  * @param source the source to register
  */
 public void registerSource(Source source) {
   mSources.add(source);
   try {
     mMetricRegistry.register(source.getName(), source.getMetricRegistry());
   } catch (IllegalArgumentException e) {
     LOG.warn("Metrics already registered. Exception:" + e.getMessage());
   }
 }
Beispiel #2
0
 /**
  * Removes a Source.
  *
  * @param source the source to remove
  */
 public void removeSource(Source source) {
   mSources.remove(source);
   mMetricRegistry.remove(source.getName());
 }