Lease lease = leases.get(leaseName);
// We need to check to see if the remove is successful as the poll in the run()
// method could have completed between the get and the remove which will result
// in a corrupt leaseQueue.
if (lease == null || !leaseQueue.remove(lease)) {
throw new LeaseException("lease '" + leaseName +
"' does not exist or has already expired");
}
lease.resetExpirationTime();
leaseQueue.add(lease);
}