[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137195#comment-14137195
 ] 

Ivan Kelly edited comment on BOOKKEEPER-782 at 9/17/14 1:11 PM:
----------------------------------------------------------------

Then BOOKKEEPER-773 can do:
{code}
Cookie oldCookie = Cookie.readFromZooKeeper(zk, conf);
Cookie.Builder newCookieBuilder = Cookie.newBuilder(oldCookie);
newCookieBuilder.setBookieHost(newBookieHost);
newCookieBuilder.build().writeToZooKeeper(zk, conf);
{code}


was (Author: ikelly):
Then BOOKKEEPER-773 can do:
{quote}
Cookie oldCookie = Cookie.readFromZooKeeper(zk, conf);
Cookie.Builder newCookieBuilder = Cookie.newBuilder(oldCookie);
newCookieBuilder.setBookieHost(newBookieHost);
newCookieBuilder.build().writeToZooKeeper(zk, conf);
{quote}

> Use builder pattern for Cookie
> ------------------------------
>
>                 Key: BOOKKEEPER-782
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-782
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-server
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 4.3.0
>
>         Attachments: BOOKKEEPER-782.patch, BOOKKEEPER-782.patch, 
> BOOKKEEPER-782.patch, BOOKKEEPER-782.patch, BOOKKEEPER-782.patch
>
>
> It would be good to use builder pattern for Cookie, rather than modifying the 
> fields in place.



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

Reply via email to