[ https://issues.apache.org/jira/browse/CASSANDRA-13457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16577607#comment-16577607 ]
Jason Brown commented on CASSANDRA-13457: ----------------------------------------- {quote}One of the requirements for raising events was to generate as little garbage as possible {quote} OK, that's a reasonable explanation. I'm fine with the current implementation then. {quote}This is the event creation time, determined on best effort basis with no formal guarantees to it whatsoever {quote} sgtm. This is what I assummed, but wanted to confirm. Thanks. {quote}GossiperEvent will create an immutable copies in the ctor... {quote} I am reticent to open up the mutatble state of Gosspier any more than it is now. I agree we should avoid getters in general, but in this case protecting the local view of the entire cluster is where we should exercise a great deal of caution. Thus, I would prefer an alternative to changing the visibility of those member fields. {quote}toString() ... It has been implemented to provide a short textual representation about the kind of operation that happened, as part of an auditing event. It should be short an concise, but I don't know what else to put there that would totally avoid breaking any potential consumers relying on it {quote} As an alternative to overriding toString(), you could introduce a new interface, naively like this: {code:java} public interface DiagnosticEventLogger { String toDiagnosticString(); } {code} I'm not necessarily advocating this, but it allows the implementation itself to distinguish between the two types of logging. I'll let you make the call here. (wrt Serializable) {quote}but really this method is only supposed to return details on the event that can be used by external consumers. {quote} I understand that. It is the type, {{Serializable}}, that is surprising as we use it nowhere else in the codebase, and that type means java object serialization, which we also don't use. Looking at the implementations, it seems like almost all of the values you putting into the map are strings and primitives/boxed primitives. Would it make sense to switch this API to return {{Map<String, String>}}? > Diag. Events: Add base classes > ------------------------------ > > Key: CASSANDRA-13457 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13457 > Project: Cassandra > Issue Type: Sub-task > Components: Core, Observability > Reporter: Stefan Podkowinski > Assignee: Stefan Podkowinski > Priority: Major > > Base ticket for adding classes that will allow you to implement and subscribe > to events. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org