Repository: apache/kafka
File: server-common/src/main/java/org/apache/kafka/server/share/persister/PersisterStateManager.java (Java)

Code before:
        public PersisterStateManagerHandler(
            String groupId,
            Uuid topicId,
            int partition,
            long backoffMs,
            long backoffMaxMs,
            int maxRPCRetryAttempts
        ) {
            this.findCoordBackoff = new ExponentialBackoffManager(
                maxRPCRetryAttempts,
                backoffMs,
                RETRY_BACKOFF_EXP_BASE,
                backoffMaxMs,
                RETRY_BACKOFF_JITTER);
            this.onCompleteCallback = response -> {
            }; // noop
            partitionKey = SharePartitionKey.getInstance(groupId, topicId, partition);
        }

        protected abstract Logger log();

        /**
         * Child class must create appropriate builder object for the handled RPC
         *
         * @return builder for the request
         */
        protected abstract AbstractRequest.Builder<? extends AbstractRequest> requestBuilder();

        /**
         * Handles the response for an RPC.
         *
         * @param response - Client response
         */
        protected abstract void handleRequestResponse(ClientResponse response);

        /**
         * Returns true if the response is valid for the respective child class.
         *
         * @param response - Client response
         * @return - boolean
         */
        protected abstract boolean isResponseForRequest(ClientResponse response);

        /**
         * Handle invalid find coordinator response. If error is UNKNOWN_SERVER_ERROR, look at the
         * exception details to figure out the problem.
         *
         * @param error
         * @param exception
         */
        protected abstract void findCoordinatorErrorResponse(Errors error, Exception exception);

Review comment (refactor):
Could you add comments for this abstract method? otherwise, it looks like the method is implemented by a java tourist

Code after:
        public PersisterStateManagerHandler(
            String groupId,
            Uuid topicId,
            int partition,
            long backoffMs,
            long backoffMaxMs,
            int maxRPCRetryAttempts
        ) {
            this.findCoordBackoff = new ExponentialBackoffManager(
                maxRPCRetryAttempts,
                backoffMs,
                RETRY_BACKOFF_EXP_BASE,
                backoffMaxMs,
                RETRY_BACKOFF_JITTER);
            this.onCompleteCallback = response -> {
            }; // noop
            partitionKey = SharePartitionKey.getInstance(groupId, topicId, partition);
        }

        /**
         * Child classes must provide their own static logger instance. This avoids unnecessary resource usage
         * caused by creating a large number of logger instances.
         *
         * @return child class logger
         */
        protected abstract Logger log();

        /**
         * Child class must create appropriate builder object for the handled RPC
         *
         * @return builder for the request
         */
        protected abstract AbstractRequest.Builder<? extends AbstractRequest> requestBuilder();

        /**
         * Handles the response for an RPC.
         *
         * @param response - Client response
         */
        protected abstract void handleRequestResponse(ClientResponse response);

        /**
         * Returns true if the response is valid for the respective child class.
         *
         * @param response - Client response
         * @return - boolean
         */
        protected abstract boolean isResponseForRequest(ClientResponse response);

        /**
         * Handle invalid find coordinator response. If error is UNKNOWN_SERVER_ERROR, look at the