static LedgerHandle create ( BookKeeper bookKeeper , BookKeeperConfig config ) throws DurableDataLogException { try { return Exceptions . handleInterruptedCall ( ( ) -> bookKeeper . createLedger ( config . getBkEnsembleSize ( ) , config . getBkWriteQuorumSize ( ) , config . getBkAckQuorumSize ( ) , LEDGER_DIGEST_TYPE , config . getBKPassword ( ) ) ) ; } catch ( BKException . BKNotEnoughBookiesException bkEx ) { throw new DataLogNotAvailableException ( "Unable to create new BookKeeper Ledger." , bkEx ) ; } catch ( BKException bkEx ) { throw new DurableDataLogException ( "Unable to create new BookKeeper Ledger." , bkEx ) ; } }
Creates a new Ledger in BookKeeper .