class LeaseManager {

  void removeLease(Lease lease, LeasePath src)
      throws StorageException, TransactionContextException {
    if(lease == null){
      LOG.warn("Lease not found. Removing lease path");
      src.deletePersistent();
      return;
    }

    if (!lease.removePath(src)) {
      LOG.error(src + " not found in lease.paths (=" + lease.getPaths() + ")");
    }
    src.deletePersistent();

    if (!lease.hasPath()) {
      lease.deletePersistent();
    }
  }

    LeaseManager(FSNamesystem fsnamesystem);

}