code: public Collection<EditLogLedgerMetadata> listLedgers(
        boolean includeInProgressLedgers) throws IOException {
      // Use TreeSet to sort ledgers by firstTxId
      TreeSet<EditLogLedgerMetadata> ledgers =
          new TreeSet<EditLogLedgerMetadata>();
  
      try {
        List<String> ledgerNames = zooKeeper.getChildren(ledgerParentPath,
            false);
        for (String ledgerName : ledgerNames) {
          if (ledgerName.endsWith(BKJM_EDIT_CORRUPT)) {
            continue;
          }
          if (!includeInProgressLedgers && ledgerName.contains(BKJM_EDIT_INPROGRESS)) {
            continue;
          }
  
          String fullLedgerMetadataPath = fullyQualifiedPathForLedger(ledgerName);
          EditLogLedgerMetadata metadata =
              readEditLogLedgerMetadata(fullLedgerMetadataPath);
          if (metadata != null) {
            if (LOG.isTraceEnabled()) {
              LOG.trace("Read " + metadata + " from " + fullLedgerMetadataPath);
            }
            ledgers.add(metadata);
          } else { // metadata would be returns null iff path doesn't exist
            LOG.warn("ZNode " + fullLedgerMetadataPath +
                " might have been finalized and deleted.");
          }
        }
      } catch (InterruptedException e) {
        interruptedException(
            "Interrupted listing ledgers under " + ledgerParentPath, e);
      } catch (KeeperException e) {
        keeperException("Unrecoverable ZooKeeper error listing ledgers " +
            "under " + ledgerParentPath, e);
      }
      return ledgers;
    }
docs: List all ledgers in this instance's ZooKeeper namespace.
  @param includeInProgressLedgers If true, will include in-progress
  (non-finalized) ledgers
  @return A list of ledgers ordered (in increasing order) by the first
  transaction id, using
  {@link EditLogLedgerMetadata#compareTo(EditLogLedgerMetadata)}
  @throws IOException