brandboat commented on code in PR #19079:
URL: https://github.com/apache/kafka/pull/19079#discussion_r2481525361
##########
metadata/src/main/java/org/apache/kafka/image/ClientQuotasImage.java:
##########
@@ -48,11 +48,36 @@
* <p>
* This class is thread-safe.
*/
-public record ClientQuotasImage(Map<ClientQuotaEntity, ClientQuotaImage>
entities) {
+public final class ClientQuotasImage {
public static final ClientQuotasImage EMPTY = new
ClientQuotasImage(Map.of());
+ private final Map<ClientQuotaEntity, ClientQuotaImage> entities;
+
+ // Map from entity type to entity name to set of entries. The entity type
could be "user", "client-id", and "ip".
+ // {
+ // "user": { "user1": [entry1, entry2], "user2": [entry3] },
+ // "client-id": { "client-id1": [entry4], "client-id2": [entry5] },
+ // "ip": { "ip1": [entry6], "ip2": [entry7] }
+ // }
+ private final Map<String, Map<String, Set<Entry<ClientQuotaEntity,
ClientQuotaImage>>>> entitiesByType;
Review Comment:
just curious, it there a specific reason not to use Map<> ?
```suggestion
private final Map<String, Map<String, Map<ClientQuotaEntity,
ClientQuotaImage>>> entitiesByType;
```
--
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]