Re: BP-15 New CreateLeader API

2017-09-04 Thread Sijie Guo
KEEPER/ > BP-15+New+CreateLedger+API > > -- Enrico > > 2017-09-01 10:33 GMT+02:00 Enrico Olivelli : > > > Hi all, > > I have just posted a proposal to introduce a new createLedger API using > > the 'builder' design pattern. > > > > https://c

Re: BP-15 New CreateLeader API

2017-09-01 Thread Enrico Olivelli
BookKeeper { > > > > > > > > > > ICreateBuilder createLedger() { > > > > > > > > > > // return a ledger create op builder > > > > > > > > > > } > > > > > > > > > > } &

Re: BP-15 New CreateLeader API

2017-09-01 Thread Sijie Guo
> > > // return a ledger create op builder > > > > > > > > } > > > > > > > > } > > > > > > > > > > > > there are a few benefits using this approach: > > > > > > > >

Re: BP-15 New CreateLeader API

2017-09-01 Thread Enrico Olivelli
have a consistent style for different ops and easy to extend in > > > future. > > > > > > > yes > > > > > > > - we can use this approach to cleanup all the interfaces. so we can > > > separate interface from implementation eventually,

Re: BP-15 New CreateLeader API

2017-09-01 Thread Sijie Guo
lete/open. >> we >> > will have a consistent style for different ops and easy to extend in >> > future. >> > >> >> yes >> >> >> > - we can use this approach to cleanup all the interfaces. so we can >> > separa

Re: BP-15 New CreateLeader API

2017-09-01 Thread Sijie Guo
courage people to use new API and phase out > the > > old API. > > > yes > > > > - we should also have interface for LedgerHandle, try to separate write > > interface from read interface to produce a cleaner interface. > > > > I totally agree on this poi

Re: BP-15 New CreateLeader API

2017-09-01 Thread Enrico Olivelli
meaning of some variables (and so getters...) is "contextual" Having different interfaces will let use be clearer on the contracts with the client > > > Any thoughts? > > - Sijie > > > On Fri, Sep 1, 2017 at 1:33 AM, Enrico Olivelli > wrote: > > > Hi al

Re: BP-15 New CreateLeader API

2017-09-01 Thread Sijie Guo
;builder' design pattern. > > https://cwiki.apache.org/confluence/display/BOOKKEEPER/ > BP-15+New+CreateLeader+API > > This is a pre-requisite for BP-14 Relax Durability and for LedgerType > improvements > > It is a trivial change but it will be the base for future enh

Re: BP-15 New CreateLeader API

2017-09-01 Thread Enrico Olivelli
new createLedger API using > the 'builder' design pattern. > > https://cwiki.apache.org/confluence/display/BOOKKEEPER/ > BP-15+New+CreateLeader+API > > This is a pre-requisite for BP-14 Relax Durability and for LedgerType > improvements > > It is a trivial c

BP-15 New CreateLeader API

2017-09-01 Thread Enrico Olivelli
Hi all, I have just posted a proposal to introduce a new createLedger API using the 'builder' design pattern. https://cwiki.apache.org/confluence/display/BOOKKEEPER/BP-15+New+CreateLeader+API This is a pre-requisite for BP-14 Relax Durability and for LedgerType improvements It is