* @throws BKException
*/
public LedgerHandle createLedger(int ensSize, int qSize,
DigestType digestType, byte passwd[]) throws KeeperException,
InterruptedException, IOException, BKException {
SyncCounter counter = new SyncCounter();
counter.inc();
/*
* Calls asynchronous version
*/
asyncCreateLedger(ensSize, qSize, digestType, passwd, this, counter);
/*
* Wait
*/
counter.block(0);
if (counter.getLh() == null) {
LOG.error("ZooKeeper error: " + counter.getrc());
throw BKException.create(Code.ZKException);
}
return counter.getLh();
}