cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michaelsembwever <>
Subject [GitHub] cassandra pull request #:
Date Thu, 08 Mar 2018 23:37:22 GMT
Github user michaelsembwever commented on the pull request:
    In src/java/org/apache/cassandra/dht/
    In src/java/org/apache/cassandra/dht/ on line 62:
    out of curiosity:
     could we go one step further to avoid the static methods in the event classes as well?
    For example putting `DiagnosticEventService.instance()` into a member field in an "events"
class which holds the existing static util methods, and in the peer classes that use the events
class instantiate and keep an instance. 
    Something like:
    public class BootstrapEvents // this could also be named "BootstrapEventUtil"
        private final DiagnosticEventService service;
            this.service = DiagnosticEventService.instance();
        BootstrapEvent(DiagnosticEventService service)
            this.service = service;
        private static class BootstrapEvent extends DiagnosticEvent
            private final BootstrapEventType type;
            private final TokenMetadata tokenMetadata;
            private final InetAddressAndPort address;
            private final String allocationKeyspace;
            private final Integer numTokens;
            private final Collection<Token> tokens;
            private BootstrapEvent(BootstrapEventType type, InetAddressAndPort address, TokenMetadata
                                   String allocationKeyspace, int numTokens, ImmutableCollection<Token>
    public class BootStrapper extends ProgressEventNotifierSupport
        private final BoostrapEvents bootstrapEvents = BootstrapEvents();


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message