kirktrue commented on code in PR #16673:
URL: https://github.com/apache/kafka/pull/16673#discussion_r1735410718


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/AssignmentChangeEvent.java:
##########
@@ -16,33 +16,31 @@
  */
 package org.apache.kafka.clients.consumer.internals.events;
 
-import org.apache.kafka.clients.consumer.OffsetAndMetadata;
 import org.apache.kafka.common.TopicPartition;
 
-import java.util.Collections;
-import java.util.Map;
+import java.util.Collection;
 
-public class AssignmentChangeEvent extends ApplicationEvent {
+public class AssignmentChangeEvent extends CompletableApplicationEvent<Void> {
 
-    private final Map<TopicPartition, OffsetAndMetadata> offsets;
     private final long currentTimeMs;
+    private final Collection<TopicPartition> partitions;
 
-    public AssignmentChangeEvent(final Map<TopicPartition, OffsetAndMetadata> 
offsets, final long currentTimeMs) {
-        super(Type.ASSIGNMENT_CHANGE);
-        this.offsets = Collections.unmodifiableMap(offsets);
+    public AssignmentChangeEvent(final long currentTimeMs, final long 
deadlineMs, final Collection<TopicPartition> partitions) {
+        super(Type.ASSIGNMENT_CHANGE, deadlineMs);
         this.currentTimeMs = currentTimeMs;
-    }
-
-    public Map<TopicPartition, OffsetAndMetadata> offsets() {
-        return offsets;
+        this.partitions = partitions;

Review Comment:
   Minor point, but we do have a pattern of marking the collections as 
immutable via `Collections.unmodifiableSet()` and friends.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to