code: @Override
      public void close() {
          if (!this.closed.getAndSet(true)) {
              if (this.currentLedger != null) {
                  try {
                      Ledgers.close(this.currentLedger.handle);
                  } catch (DurableDataLogException bkEx) {
                      log.error("Unable to close LedgerHandle for Ledger {}.", this.currentLedger.handle.getId(), bkEx);
                  }
  
                  this.currentLedger = null;
              }
          }
      }
docs: region AutoCloseable Implementation