You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Neha Narkhede (JIRA)" <ji...@apache.org> on 2012/06/01 00:39:23 UTC
[jira] [Created] (KAFKA-354) Refactor getter and setter API to
conform to the new convention
Neha Narkhede created KAFKA-354:
-----------------------------------
Summary: Refactor getter and setter API to conform to the new convention
Key: KAFKA-354
URL: https://issues.apache.org/jira/browse/KAFKA-354
Project: Kafka
Issue Type: Sub-task
Affects Versions: 0.8
Reporter: Neha Narkhede
We just agreed on a new convention for getter/setter APIs. It will be good to refactor code to conform to that.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (KAFKA-354) Refactor getter and setter API to
conform to the new convention
Posted by "Joe Stein (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Stein updated KAFKA-354:
----------------------------
Description:
We just agreed on a new convention for getter/setter APIs. It will be good to refactor code to conform to that.
> We can actually go with public vals or vars - there is not much point in
> defining a custom getter/setter as that is redundant.
>
> For example:
> - start with "val x"
> - over time, we determine that it needs to be mutable - change it to "var
> x"
> - if you need something more custom (e.g., enforce constraints on the
> values that you can assign) then we can add the custom setter
> private[this] var underyling: T = ...
> def x = underlying
> def x_=(update: T) { if (constraint satisfied) {underlying = update}
> else {throw new Exception} }
>
> All of the above changes will be binary compatible since under the covers,
> reads/assignments are all through getter/setter methods.
was:We just agreed on a new convention for getter/setter APIs. It will be good to refactor code to conform to that.
> Refactor getter and setter API to conform to the new convention
> ---------------------------------------------------------------
>
> Key: KAFKA-354
> URL: https://issues.apache.org/jira/browse/KAFKA-354
> Project: Kafka
> Issue Type: Sub-task
> Affects Versions: 0.8
> Reporter: Neha Narkhede
> Assignee: Joe Stein
>
> We just agreed on a new convention for getter/setter APIs. It will be good to refactor code to conform to that.
> > We can actually go with public vals or vars - there is not much point in
> > defining a custom getter/setter as that is redundant.
> >
> > For example:
> > - start with "val x"
> > - over time, we determine that it needs to be mutable - change it to "var
> > x"
> > - if you need something more custom (e.g., enforce constraints on the
> > values that you can assign) then we can add the custom setter
> > private[this] var underyling: T = ...
> > def x = underlying
> > def x_=(update: T) { if (constraint satisfied) {underlying = update}
> > else {throw new Exception} }
> >
> > All of the above changes will be binary compatible since under the covers,
> > reads/assignments are all through getter/setter methods.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (KAFKA-354) Refactor getter and setter API to
conform to the new convention
Posted by "Joel Koshy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joel Koshy updated KAFKA-354:
-----------------------------
Labels: optimization (was: )
> Refactor getter and setter API to conform to the new convention
> ---------------------------------------------------------------
>
> Key: KAFKA-354
> URL: https://issues.apache.org/jira/browse/KAFKA-354
> Project: Kafka
> Issue Type: Sub-task
> Affects Versions: 0.8
> Reporter: Neha Narkhede
> Assignee: Joe Stein
> Labels: optimization
>
> We just agreed on a new convention for getter/setter APIs. It will be good to refactor code to conform to that.
> > We can actually go with public vals or vars - there is not much point in
> > defining a custom getter/setter as that is redundant.
> >
> > For example:
> > - start with "val x"
> > - over time, we determine that it needs to be mutable - change it to "var
> > x"
> > - if you need something more custom (e.g., enforce constraints on the
> > values that you can assign) then we can add the custom setter
> > private[this] var underyling: T = ...
> > def x = underlying
> > def x_=(update: T) { if (constraint satisfied) {underlying = update}
> > else {throw new Exception} }
> >
> > All of the above changes will be binary compatible since under the covers,
> > reads/assignments are all through getter/setter methods.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KAFKA-354) Refactor getter and setter API to
conform to the new convention
Posted by "Neha Narkhede (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419671#comment-13419671 ]
Neha Narkhede commented on KAFKA-354:
-------------------------------------
Hey Joe, did you get a chance to look into this yet ?
> Refactor getter and setter API to conform to the new convention
> ---------------------------------------------------------------
>
> Key: KAFKA-354
> URL: https://issues.apache.org/jira/browse/KAFKA-354
> Project: Kafka
> Issue Type: Sub-task
> Affects Versions: 0.8
> Reporter: Neha Narkhede
> Assignee: Joe Stein
>
> We just agreed on a new convention for getter/setter APIs. It will be good to refactor code to conform to that.
> > We can actually go with public vals or vars - there is not much point in
> > defining a custom getter/setter as that is redundant.
> >
> > For example:
> > - start with "val x"
> > - over time, we determine that it needs to be mutable - change it to "var
> > x"
> > - if you need something more custom (e.g., enforce constraints on the
> > values that you can assign) then we can add the custom setter
> > private[this] var underyling: T = ...
> > def x = underlying
> > def x_=(update: T) { if (constraint satisfied) {underlying = update}
> > else {throw new Exception} }
> >
> > All of the above changes will be binary compatible since under the covers,
> > reads/assignments are all through getter/setter methods.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (KAFKA-354) Refactor getter and setter API to
conform to the new convention
Posted by "Joe Stein (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Stein reassigned KAFKA-354:
-------------------------------
Assignee: Joe Stein
> Refactor getter and setter API to conform to the new convention
> ---------------------------------------------------------------
>
> Key: KAFKA-354
> URL: https://issues.apache.org/jira/browse/KAFKA-354
> Project: Kafka
> Issue Type: Sub-task
> Affects Versions: 0.8
> Reporter: Neha Narkhede
> Assignee: Joe Stein
>
> We just agreed on a new convention for getter/setter APIs. It will be good to refactor code to conform to that.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira