[ 
https://issues.apache.org/jira/browse/MINIFI-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15997274#comment-15997274
 ] 

ASF GitHub Bot commented on MINIFI-258:
---------------------------------------

Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/91#discussion_r114861428
  
    --- Diff: libminifi/include/core/ConfigurationFactory.h ---
    @@ -30,25 +30,29 @@ namespace core {
     
     template<typename T>
     typename std::enable_if<!class_operations<T>::value, T*>::type instantiate(
    -    std::shared_ptr<core::Repository> repo,
    -    std::shared_ptr<core::Repository> flow_file_repo, const std::string 
path) {
    +    const std::shared_ptr<core::Repository> &repo,
    +    const std::shared_ptr<core::Repository> &flow_file_repo, const 
std::string path) {
       throw std::runtime_error("Cannot instantiate class");
     }
     
     template<typename T>
     typename std::enable_if<class_operations<T>::value, T*>::type instantiate(
    -    std::shared_ptr<core::Repository> repo,
    -    std::shared_ptr<core::Repository> flow_file_repo, const std::string 
path) {
    -  return new T(repo, flow_file_repo, path);
    +    const std::shared_ptr<core::Repository> &repo,
    +    const std::shared_ptr<core::Repository> &flow_file_repo,
    +    const std::shared_ptr<io::StreamFactory> &stream_factory,
    +    const std::string path) {
    +  return new T(repo, flow_file_repo, stream_factory, path);
     }
     
     /**
      * Configuration factory is used to create a new FlowConfiguration
      * object.
      */
     std::unique_ptr<core::FlowConfiguration> createFlowConfiguration(
    --- End diff --
    
    Same as flow controller. The ones in instantiate, above, are fine. 


> Avoid using singleton for Configure. 
> -------------------------------------
>
>                 Key: MINIFI-258
>                 URL: https://issues.apache.org/jira/browse/MINIFI-258
>             Project: Apache NiFi MiNiFi
>          Issue Type: Bug
>          Components: C++
>            Reporter: marco polo
>            Assignee: Bryan Rosander
>
> Avoiding a singleton for Configure will allow us to eventually support 
> multiple, disparate flows. The object FlowConfiguration can be passed with 
> the information in Configure. This has increased coupling dramatically while 
> also limiting how configurations can be stored within minifi. 
> It stands to reason that to eventually support C2 activities and to 
> facilitate multiple configurations, we will need to remove state from the 
> global level and make it something that is referenced from the objects which 
> care ( proper encapsulation ). 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to