worryg0d commented on PR #1929: URL: https://github.com/apache/cassandra-gocql-driver/pull/1929#issuecomment-3883703794
There are a couple of things that can be potentially improved: 1. Extract event processing methods (e.g., `(s *Session) handleSchemaKeyspaceChange(f *schemaChangeKeyspace)`, `(s *Session) notifyKeyspaceChange(change string, oldKs, newKs *KeyspaceMetadata)`, etc) from the `Session` to something like `eventProcessor`. 2. Add each listener multiplexer implementation, for example [MultiplexingSchemaChangeListener.java](https://github.com/apache/cassandra-java-driver/blob/16260261d3df50fcf24fac1fc2d37896c4a111bf/core/src/main/java/com/datastax/oss/driver/internal/core/metadata/schema/MultiplexingSchemaChangeListener.java#L46) 3. Think about using a different struct for each event type, e.g., `OnKeyspaceCreated(event KeyspaceCreatedEvent)`, `OnKeyspaceUpdated(event KeyspaceUpdatedEvent)`, etc. It prevents breaking the API if we need to add some fields in the future. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

