[ 
https://issues.apache.org/jira/browse/HDDS-13938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Doroszlai updated HDDS-13938:
------------------------------------
    Description: 
OM value classes like {{OmVolumeArgs}}, {{OmBucketInfo}}, etc. have conversion 
function {{getFromProtobuf}}, which creates a value object using its 
{{Builder}}.  The goal of this task is to extract a new function in each class 
that returns the {{Builder}} object after setting all properties, just before 
{{.build()}}.  Existing {{getFromProtobuf}} methods should delegate to the new 
method like:

{code}
public static OmBucketInfo getFromProtobuf(BucketInfo bucketInfo) {
  return builderFromProtobuf(bucketInfo).build();
}
{code}

  was:OM value classes like {{OmVolumeArgs}}, {{OmBucketInfo}}, etc. have 
conversion function {{getFromProtobuf}}, which creates a value object using its 
{{Builder}}.  The goal of this task is to extract a new function in each class 
that returns the {{Builder}} object after setting all properties, just before 
{{.build()}}.


> Extract builderFromProtobuf methods
> -----------------------------------
>
>                 Key: HDDS-13938
>                 URL: https://issues.apache.org/jira/browse/HDDS-13938
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Attila Doroszlai
>            Priority: Major
>
> OM value classes like {{OmVolumeArgs}}, {{OmBucketInfo}}, etc. have 
> conversion function {{getFromProtobuf}}, which creates a value object using 
> its {{Builder}}.  The goal of this task is to extract a new function in each 
> class that returns the {{Builder}} object after setting all properties, just 
> before {{.build()}}.  Existing {{getFromProtobuf}} methods should delegate to 
> the new method like:
> {code}
> public static OmBucketInfo getFromProtobuf(BucketInfo bucketInfo) {
>   return builderFromProtobuf(bucketInfo).build();
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to