Ashish K Singh created KAFKA-3620:
-------------------------------------

             Summary: Clean up Protocol class.
                 Key: KAFKA-3620
                 URL: https://issues.apache.org/jira/browse/KAFKA-3620
             Project: Kafka
          Issue Type: Improvement
            Reporter: Ashish K Singh
            Assignee: Ashish K Singh


This came up on PR of KAFKA-3307. Below is excerpt.

{quote}
With the versioning getting a little more complex in Protocol class, it makes 
sense to try and encapsulate some of its logic a little better. For example, 
rather than using raw arrays for each request type, we could have something 
like this:

class KafkaApi {
  private ApiKey api;
  private Schema[] requests;
  private Schema[] responses;

  Schema currentSchema();
  Schema schemaFor(int version);
  int minVersion();
  int currentVersion();
}
{quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to