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

Enrico Olivelli commented on BOOKKEEPER-928:
--------------------------------------------

We need to add a new createLedger method, like
{code}
public void asyncCreateLedger(final int ensSize,
                                  final int writeQuorumSize,
                                  final int ackQuorumSize,
                                  final DigestType digestType,
                                  final byte[] passwd,
                                  final byte[] customMetadata,
 final CreateCallback cb, final Object ctx) {
{code}

Would it be better to create a CreateLedgerSpecs bean like
{code}
class CreateLedgerSpecs {
          int ensSize;
          int writeQuorumSize;
          int ackQuorumSize;
          DigestType digestType;
          byte[] passwd;
          byte[] customMetadata;
}
{code}

and create a more future-proof  createLedger method (and the blocking counter 
part)
{code}
public void asyncCreateLedger(
          final CreateLedgerSpecs,
          final CreateCallback cb, final Object ctx) {
{code}

for the CreateLedgerSpecs bean we could follow the Builder pattern in order to 
have a more intuitive API

what do you think ?


> Add custom client supplied metadata field to LedgerMetadata
> -----------------------------------------------------------
>
>                 Key: BOOKKEEPER-928
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-928
>             Project: Bookkeeper
>          Issue Type: New Feature
>          Components: bookkeeper-client, bookkeeper-server
>    Affects Versions: 4.4.0
>            Reporter: Enrico Olivelli
>             Fix For: 4.5.0
>
>
> The idea is to let the client write a custom byte[] field which contains 
> useful custom metadata about the ledger. 
> This field is needed by BOOKKEEPER-912



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

Reply via email to