This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 71442bf42f5 MINOR: cleanup in QuotaFactory (#20312)
71442bf42f5 is described below

commit 71442bf42f56cfa827ccd91187e0297fef93be25
Author: Lan Ding <[email protected]>
AuthorDate: Thu Aug 7 00:05:45 2025 +0800

    MINOR: cleanup in QuotaFactory (#20312)
    
    cleanup in QuotaFactory.
    
    Reviewers: Chia-Ping Tsai <[email protected]>
---
 core/src/main/java/kafka/server/QuotaFactory.java | 63 +++--------------------
 1 file changed, 8 insertions(+), 55 deletions(-)

diff --git a/core/src/main/java/kafka/server/QuotaFactory.java 
b/core/src/main/java/kafka/server/QuotaFactory.java
index 693decca6b4..b672be42650 100644
--- a/core/src/main/java/kafka/server/QuotaFactory.java
+++ b/core/src/main/java/kafka/server/QuotaFactory.java
@@ -51,61 +51,14 @@ public class QuotaFactory {
         }
     };
 
-    public static class QuotaManagers {
-        private final ClientQuotaManager fetch;
-        private final ClientQuotaManager produce;
-        private final ClientRequestQuotaManager request;
-        private final ControllerMutationQuotaManager controllerMutation;
-        private final ReplicationQuotaManager leader;
-        private final ReplicationQuotaManager follower;
-        private final ReplicationQuotaManager alterLogDirs;
-        private final Optional<Plugin<ClientQuotaCallback>> 
clientQuotaCallbackPlugin;
-
-        public QuotaManagers(ClientQuotaManager fetch, ClientQuotaManager 
produce, ClientRequestQuotaManager request,
-                             ControllerMutationQuotaManager 
controllerMutation, ReplicationQuotaManager leader,
-                             ReplicationQuotaManager follower, 
ReplicationQuotaManager alterLogDirs,
-                             Optional<Plugin<ClientQuotaCallback>> 
clientQuotaCallbackPlugin) {
-            this.fetch = fetch;
-            this.produce = produce;
-            this.request = request;
-            this.controllerMutation = controllerMutation;
-            this.leader = leader;
-            this.follower = follower;
-            this.alterLogDirs = alterLogDirs;
-            this.clientQuotaCallbackPlugin = clientQuotaCallbackPlugin;
-        }
-
-        public ClientQuotaManager fetch() {
-            return fetch;
-        }
-
-        public ClientQuotaManager produce() {
-            return produce;
-        }
-
-        public ClientRequestQuotaManager request() {
-            return request;
-        }
-
-        public ControllerMutationQuotaManager controllerMutation() {
-            return controllerMutation;
-        }
-
-        public ReplicationQuotaManager leader() {
-            return leader;
-        }
-
-        public ReplicationQuotaManager follower() {
-            return follower;
-        }
-
-        public ReplicationQuotaManager alterLogDirs() {
-            return alterLogDirs;
-        }
-
-        public Optional<Plugin<ClientQuotaCallback>> 
clientQuotaCallbackPlugin() {
-            return clientQuotaCallbackPlugin;
-        }
+    public record QuotaManagers(ClientQuotaManager fetch,
+                                ClientQuotaManager produce,
+                                ClientRequestQuotaManager request,
+                                ControllerMutationQuotaManager 
controllerMutation,
+                                ReplicationQuotaManager leader,
+                                ReplicationQuotaManager follower,
+                                ReplicationQuotaManager alterLogDirs,
+                                Optional<Plugin<ClientQuotaCallback>> 
clientQuotaCallbackPlugin) {
 
         public void shutdown() {
             fetch.shutdown();

Reply via email to