sigram commented on a change in pull request #959: SOLR-13677 fix & cleanup
URL: https://github.com/apache/lucene-solr/pull/959#discussion_r335844745
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/metrics/SolrMetricProducer.java
 ##########
 @@ -19,17 +19,72 @@
 /**
  * Used by objects that expose metrics through {@link SolrMetricManager}.
  */
-public interface SolrMetricProducer {
+public interface SolrMetricProducer extends AutoCloseable {
+
+  /**
+   * Unique metric tag identifies components with the same life-cycle, which 
should
+   * be registered / unregistered together. It is in the format of A:B:C, where
+   * A is the parent of B is the parent of C and so on.
+   * If object "B" is unregistered C also must get unregistered.
+   * If object "A" is unregistered B and C also must get unregistered.
+   * @param o object to create a tag for
+   * @param parentName parent object name, or null if no parent
+   */
+  static String getUniqueMetricTag(Object o, String parentName) {
 
 Review comment:
   Changed this into a static utility method because some other components need 
to create a tag or child tag without actually being SolrMetricProducer-s.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to