Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is an example of the new API        BookKeeper bookeeper =

Code Block


        BookKeeper bookeeper = ....;

...


        LedgerConfiguration ledgerConfiguration = LedgerConfiguration.builder()

...

                                                                                      .ensembleSize(3)

                                                                                      .writeQuorumSize(2)

                                                                                      .ackQuorumSize(1)

                                                                                      .digestType(DigestType.CRC32)

                                                                                      .customMetadata(Map<String, byte[]> metadata)

                                                                                      .password(password)

...


                                                                                      .ensembleSize(3)
                                                                                      .writeQuorumSize(2)
                                                                                      .ackQuorumSize(1)
                                                                                      .digestType(DigestType.CRC32)                                       
																					   .customMetadata(Map<String, byte[]> metadata)
                                                                                      .password(password)
                                                                                      .advanced(true|false);

...


        LedgerHandle ledger = bookeeper.createLedger(ledgerConfiguration);

...


        bookeeper.createLedgerAsync(ledgerConfiguration, createCallback,

...

  ctx);
        CompletableFuture<LedgerHandle> future = bookeeper.asyncCreateLedger(ledgerConfiguration);

 

So we will introduce a new LedgerConfiguration class which defines the configuration options of the Ledger and we will support a new simple API which takes that structure.

...