arpadboda commented on a change in pull request #743: Minificpp 1169 - Simplify 
C2 metrics collection and reporting
URL: https://github.com/apache/nifi-minifi-cpp/pull/743#discussion_r389965084
 
 

 ##########
 File path: libminifi/include/FlowController.h
 ##########
 @@ -304,23 +305,23 @@ class FlowController : public 
core::controller::ControllerServiceProvider, publi
   virtual void enableAllControllerServices();
 
   /**
-   * Retrieves all root response nodes from this source.
-   * @param metric_vector -- metrics will be placed in this vector.
-   * @return result of the get operation.
-   *  0 Success
-   *  1 No error condition, but cannot obtain lock in timely manner.
-   *  -1 failure
+   * Retrieves metrics node
+   * @return metrics response node
    */
-  virtual int16_t 
getResponseNodes(std::vector<std::shared_ptr<state::response::ResponseNode>> 
&metric_vector, uint16_t metricsClass);
+  virtual std::shared_ptr<state::response::ResponseNode> getMetricsNode() 
const;
+
+  /**
+   * Retrieves root nodes configured to be included in heartbeat
+   * @param includeManifest -- determines if manifest is to be included
+   * @return a list of response nodes
+   */
+  virtual std::vector<std::shared_ptr<state::response::ResponseNode>> 
getHeartbeatNodes(bool includeManifest) const;
 
 Review comment:
   Do these really need to be shared?
   Do we ever copy the metrics, heartbeat nodes and the manifest?
   
   Please take it as a question, so in case the answer is yes, I'm totally fine 
with this.
   If we don't copy, just generate and send, I would prefer using unique ptrs 
to have a clear indication of ownership.  

----------------------------------------------------------------
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

Reply via email to