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

Blake Eggleston commented on CASSANDRA-7841:
--------------------------------------------

re #2: if we went the route of beginning to make module level configs, we could 
just check for a constructor that takes that config, and expose the proper 
dependencies through that config. So when instantiating an endpoint snitch, we 
could check for a constructor that takes a LocatorConfig first, passing the 
LocatorConfig in if it exists, otherwise use the default constructor. The 
endpoint snitches will be limited in their dependencies, but we won't need to 
support some weird ultraconstructor, or use any DI framework magic.

> Pass static singleton instances into constructors of dependent classes
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-7841
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7841
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Blake Eggleston
>            Assignee: Blake Eggleston
>
> Identify all non-singleton usages of static state (grep for '.instance.'), 
> and refactor to pass dependencies into their constructors from their 
> instantiating services.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to