cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michaelsembwever <...@git.apache.org>
Subject [GitHub] cassandra pull request #:
Date Fri, 09 Mar 2018 22:45:52 GMT
Github user michaelsembwever commented on the pull request:

    https://github.com/apache/cassandra/commit/ba09523de7cad3b3732c0e7e60b072f84e809e21#commitcomment-28024074
  
    In src/java/org/apache/cassandra/dht/BootstrapEvent.java:
    In src/java/org/apache/cassandra/dht/BootstrapEvent.java on line 62:
    > My bet would be that people would add Events member instances as statics again, to
save some garbage and because they are stateless anyways.
    
    Yes, and this would definitely make sense for classes that were instantiated frequently.

    That is, the following isn't wrong…
    ```
    public class BootStrapper extends ProgressEventNotifierSupport
    {
        …
        private static final BoostrapEvents bootstrapEvents = BootstrapEvents();
    …
                bootstrapEvents.useSpecifiedTokens(…);
    ```
    
    But separating the static methods in Event classes out to non-static methods in Events
classes still provides us improved testability. Which is my understanding to the reasoning
behind CASSANDRA-7840.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message